2018-08-08 07:28:26 -05:00
|
|
|
error[E0308]: mismatched types
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/regions-infer-paramd-indirect.rs:22:18
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
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>>`
|
2018-12-25 09:56:47 -06:00
|
|
|
note: the anonymous lifetime #2 defined on the method body at 21:5...
|
|
|
|
--> $DIR/regions-infer-paramd-indirect.rs:21:5
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2018-12-16 21:21:47 -06:00
|
|
|
LL | / fn set_f_bad(&mut self, b: Box<B>) {
|
2018-08-08 07:28:26 -05:00
|
|
|
LL | | self.f = b;
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | |
|
|
|
|
LL | |
|
|
|
|
LL | |
|
|
|
|
LL | |
|
2018-08-08 07:28:26 -05:00
|
|
|
LL | | }
|
|
|
|
| |_____^
|
2018-12-25 09:56:47 -06:00
|
|
|
note: ...does not necessarily outlive the lifetime 'a as defined on the impl at 16:6
|
|
|
|
--> $DIR/regions-infer-paramd-indirect.rs:16:6
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2018-12-16 21:21:47 -06:00
|
|
|
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`.
|