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