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