2020-11-05 13:29:48 +00:00
|
|
|
error[E0308]: mismatched types
|
2021-03-12 14:30:50 +00:00
|
|
|
--> $DIR/ice-6256.rs:13:28
|
2020-11-05 13:29:48 +00:00
|
|
|
|
|
|
|
|
LL | let f = |x: &dyn TT| x.func(); //[default]~ ERROR: mismatched types
|
|
|
|
| ^^^^ lifetime mismatch
|
|
|
|
|
|
|
|
|
= note: expected reference `&(dyn TT + 'static)`
|
|
|
|
found reference `&dyn TT`
|
2021-10-13 11:06:14 +00:00
|
|
|
note: the anonymous lifetime #1 defined here...
|
2021-03-12 14:30:50 +00:00
|
|
|
--> $DIR/ice-6256.rs:13:13
|
2020-11-05 13:29:48 +00:00
|
|
|
|
|
|
|
|
LL | let f = |x: &dyn TT| x.func(); //[default]~ ERROR: mismatched types
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
= note: ...does not necessarily outlive the static lifetime
|
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|