rust-clippy/tests/ui/crashes/ice-6256.stderr

19 lines
679 B
Text
Raw Normal View History

error[E0308]: mismatched types
2020-12-19 13:50:45 +00:00
--> $DIR/ice-6256.rs:12:28
|
LL | let f = |x: &dyn TT| x.func(); //[default]~ ERROR: mismatched types
| ^^^^ lifetime mismatch
|
= note: expected reference `&(dyn TT + 'static)`
found reference `&dyn TT`
2020-12-19 13:50:45 +00:00
note: the anonymous lifetime #1 defined on the body at 12:13...
--> $DIR/ice-6256.rs:12:13
|
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`.