]>
Commit | Line | Data |
---|---|---|
8faf50e0 | 1 | error[E0308]: mismatched types |
0731742a | 2 | --> $DIR/issue-7061.rs:4:46 |
8faf50e0 XL |
3 | | |
4 | LL | fn foo(&'a mut self) -> Box<BarStruct> { self } | |
1b1a35ee | 5 | | -------------- ^^^^ expected struct `Box`, found `&mut BarStruct` |
8faf50e0 | 6 | | | |
1b1a35ee | 7 | | expected `Box<BarStruct>` because of return type |
8faf50e0 | 8 | | |
1b1a35ee | 9 | = note: expected struct `Box<BarStruct>` |
60c5eb7d | 10 | found mutable reference `&'a mut BarStruct` |
8faf50e0 XL |
11 | |
12 | error: aborting due to previous error | |
13 | ||
14 | For more information about this error, try `rustc --explain E0308`. |