rust/tests/ui/issues/issue-7061.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
235 B
Rust
Raw Normal View History

struct BarStruct;
impl<'a> BarStruct {
2014-10-02 05:10:09 +00:00
fn foo(&'a mut self) -> Box<BarStruct> { self }
2015-01-12 06:01:44 +00:00
//~^ ERROR mismatched types
//~| expected struct `Box<BarStruct>`
//~| found mutable reference `&'a mut BarStruct`
}
fn main() {}