rust/tests/ui/issues/issue-7061.rs
2023-01-11 09:32:08 +00:00

10 lines
235 B
Rust

struct BarStruct;
impl<'a> BarStruct {
fn foo(&'a mut self) -> Box<BarStruct> { self }
//~^ ERROR mismatched types
//~| expected struct `Box<BarStruct>`
//~| found mutable reference `&'a mut BarStruct`
}
fn main() {}