mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-11 22:02:55 +00:00
18 lines
663 B
Text
18 lines
663 B
Text
error[E0308]: mismatched types
|
|
--> $DIR/ice-6256.rs:13: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`
|
|
note: the anonymous lifetime #1 defined here...
|
|
--> $DIR/ice-6256.rs:13: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`.
|