1 error[E0308]: mismatched types
2 --> $DIR/ice-6256.rs:11:28
4 LL | let f = |x: &dyn TT| x.func(); //[default]~ ERROR: mismatched types
5 | ^^^^ lifetime mismatch
7 = note: expected reference `&(dyn TT + 'static)`
8 found reference `&dyn TT`
9 note: the anonymous lifetime #1 defined on the body at 11:13...
10 --> $DIR/ice-6256.rs:11:13
12 LL | let f = |x: &dyn TT| x.func(); //[default]~ ERROR: mismatched types
13 | ^^^^^^^^^^^^^^^^^^^^^
14 = note: ...does not necessarily outlive the static lifetime
16 error: aborting due to previous error
18 For more information about this error, try `rustc --explain E0308`.