]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-close-over-type-parameter-1.stderr
Update tests
[rust.git] / src / test / ui / regions / regions-close-over-type-parameter-1.stderr
1 error[E0310]: the parameter type `A` may not live long enough
2   --> $DIR/regions-close-over-type-parameter-1.rs:12:5
3    |
4 LL | fn make_object1<A: SomeTrait>(v: A) -> Box<dyn SomeTrait + 'static> {
5    |                 -- help: consider adding an explicit lifetime bound...: `A: 'static +`
6 LL |     box v as Box<dyn SomeTrait + 'static>
7    |     ^^^^^
8    |
9 note: ...so that the type `A` will meet its required lifetime bounds
10   --> $DIR/regions-close-over-type-parameter-1.rs:12:5
11    |
12 LL |     box v as Box<dyn SomeTrait + 'static>
13    |     ^^^^^
14
15 error[E0309]: the parameter type `A` may not live long enough
16   --> $DIR/regions-close-over-type-parameter-1.rs:21:5
17    |
18 LL | fn make_object3<'a, 'b, A: SomeTrait + 'a>(v: A) -> Box<dyn SomeTrait + 'b> {
19    |                         -- help: consider adding an explicit lifetime bound...: `A: 'b +`
20 LL |     box v as Box<dyn SomeTrait + 'b>
21    |     ^^^^^
22    |
23 note: ...so that the type `A` will meet its required lifetime bounds
24   --> $DIR/regions-close-over-type-parameter-1.rs:21:5
25    |
26 LL |     box v as Box<dyn SomeTrait + 'b>
27    |     ^^^^^
28
29 error: aborting due to 2 previous errors
30
31 Some errors have detailed explanations: E0309, E0310.
32 For more information about an error, try `rustc --explain E0309`.