about summary refs log tree commit diff
path: root/tests/ui/issues/issue-7061.rs
blob: c5d5a9d9498df4305fee8c909a08f8d0df3a1abc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//@ 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() {}