mirror of
https://github.com/rust-lang/rust.git
synced 2026-01-21 01:30:41 +00:00
13 lines
281 B
Rust
13 lines
281 B
Rust
//@ dont-require-annotations: NOTE
|
|
|
|
struct BarStruct;
|
|
|
|
impl<'a> BarStruct {
|
|
fn foo(&'a mut self) -> Box<BarStruct> { self }
|
|
//~^ ERROR mismatched types
|
|
//~| NOTE expected struct `Box<BarStruct>`
|
|
//~| NOTE found mutable reference `&'a mut BarStruct`
|
|
}
|
|
|
|
fn main() {}
|