2014-03-06 11:55:35 -06:00
|
|
|
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
|
2019-11-13 16:16:56 -06:00
|
|
|
//~| expected struct `std::boxed::Box<BarStruct>`
|
|
|
|
//~| found mutable reference `&'a mut BarStruct`
|
2014-03-06 11:55:35 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|