rust/src/test/ui/regions/regions-infer-paramd-indirect.stderr

29 lines
1.0 KiB
Plaintext
Raw Normal View History

2018-08-08 07:28:26 -05:00
error[E0308]: mismatched types
--> $DIR/regions-infer-paramd-indirect.rs:33:18
|
LL | self.f = b;
| ^ lifetime mismatch
|
= note: expected type `std::boxed::Box<std::boxed::Box<&'a isize>>`
found type `std::boxed::Box<std::boxed::Box<&isize>>`
note: the anonymous lifetime #2 defined on the method body at 32:5...
--> $DIR/regions-infer-paramd-indirect.rs:32:5
|
LL | / fn set_f_bad(&mut self, b: Box<B>) {
2018-08-08 07:28:26 -05:00
LL | | self.f = b;
LL | | //~^ ERROR mismatched types
LL | | //~| expected type `std::boxed::Box<std::boxed::Box<&'a isize>>`
LL | | //~| found type `std::boxed::Box<std::boxed::Box<&isize>>`
LL | | //~| lifetime mismatch
LL | | }
| |_____^
note: ...does not necessarily outlive the lifetime 'a as defined on the impl at 27:6
--> $DIR/regions-infer-paramd-indirect.rs:27:6
|
LL | impl<'a> SetF<'a> for C<'a> {
2018-08-08 07:28:26 -05:00
| ^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0308`.