]> git.proxmox.com Git - rustc.git/blame - src/test/ui/regions/regions-close-param-into-object.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / regions / regions-close-param-into-object.stderr
CommitLineData
b7449926 1error[E0310]: the parameter type `T` may not live long enough
0731742a 2 --> $DIR/regions-close-param-into-object.rs:6:5
b7449926 3 |
dc9dc135 4LL | fn p1<T>(v: T) -> Box<dyn X + 'static>
74b04a01 5 | - help: consider adding an explicit lifetime bound...: `T: 'static`
b7449926 6...
532ac7d7 7LL | Box::new(v)
f9f354fc 8 | ^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
b7449926
XL
9
10error[E0310]: the parameter type `T` may not live long enough
0731742a 11 --> $DIR/regions-close-param-into-object.rs:12:5
b7449926 12 |
dc9dc135 13LL | fn p2<T>(v: Box<T>) -> Box<dyn X + 'static>
74b04a01 14 | - help: consider adding an explicit lifetime bound...: `T: 'static`
b7449926 15...
532ac7d7 16LL | Box::new(v)
1b1a35ee 17 | ^^^^^^^^^^^ ...so that the type `Box<T>` will meet its required lifetime bounds
b7449926
XL
18
19error[E0309]: the parameter type `T` may not live long enough
0731742a 20 --> $DIR/regions-close-param-into-object.rs:18:5
b7449926 21 |
dc9dc135 22LL | fn p3<'a,T>(v: T) -> Box<dyn X + 'a>
74b04a01 23 | - help: consider adding an explicit lifetime bound...: `T: 'a`
b7449926 24...
532ac7d7 25LL | Box::new(v)
f9f354fc 26 | ^^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds
b7449926
XL
27
28error[E0309]: the parameter type `T` may not live long enough
0731742a 29 --> $DIR/regions-close-param-into-object.rs:24:5
b7449926 30 |
dc9dc135 31LL | fn p4<'a,T>(v: Box<T>) -> Box<dyn X + 'a>
74b04a01 32 | - help: consider adding an explicit lifetime bound...: `T: 'a`
b7449926 33...
532ac7d7 34LL | Box::new(v)
1b1a35ee 35 | ^^^^^^^^^^^ ...so that the type `Box<T>` will meet its required lifetime bounds
b7449926
XL
36
37error: aborting due to 4 previous errors
38
48663c56 39Some errors have detailed explanations: E0309, E0310.
b7449926 40For more information about an error, try `rustc --explain E0309`.