]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-close-over-type-parameter-1.stderr
Rollup merge of #53317 - estebank:abolish-ice, r=oli-obk
[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:20:5
3    |
4 LL | fn make_object1<A:SomeTrait>(v: A) -> Box<SomeTrait+'static> {
5    |                 -- help: consider adding an explicit lifetime bound `A: 'static`...
6 LL |     box v as Box<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:20:5
11    |
12 LL |     box v as Box<SomeTrait+'static>
13    |     ^^^^^
14
15 error[E0310]: the parameter type `A` may not live long enough
16   --> $DIR/regions-close-over-type-parameter-1.rs:20:5
17    |
18 LL | fn make_object1<A:SomeTrait>(v: A) -> Box<SomeTrait+'static> {
19    |                 -- help: consider adding an explicit lifetime bound `A: 'static`...
20 LL |     box v as Box<SomeTrait+'static>
21    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
22    |
23 note: ...so that it can be closed over into an object
24   --> $DIR/regions-close-over-type-parameter-1.rs:20:5
25    |
26 LL |     box v as Box<SomeTrait+'static>
27    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
28
29 error[E0309]: the parameter type `A` may not live long enough
30   --> $DIR/regions-close-over-type-parameter-1.rs:30:5
31    |
32 LL | fn make_object3<'a,'b,A:SomeTrait+'a>(v: A) -> Box<SomeTrait+'b> {
33    |                       -- help: consider adding an explicit lifetime bound `A: 'b`...
34 LL |     box v as Box<SomeTrait+'b>
35    |     ^^^^^
36    |
37 note: ...so that the type `A` will meet its required lifetime bounds
38   --> $DIR/regions-close-over-type-parameter-1.rs:30:5
39    |
40 LL |     box v as Box<SomeTrait+'b>
41    |     ^^^^^
42
43 error[E0309]: the parameter type `A` may not live long enough
44   --> $DIR/regions-close-over-type-parameter-1.rs:30:5
45    |
46 LL | fn make_object3<'a,'b,A:SomeTrait+'a>(v: A) -> Box<SomeTrait+'b> {
47    |                       -- help: consider adding an explicit lifetime bound `A: 'b`...
48 LL |     box v as Box<SomeTrait+'b>
49    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
50    |
51 note: ...so that it can be closed over into an object
52   --> $DIR/regions-close-over-type-parameter-1.rs:30:5
53    |
54 LL |     box v as Box<SomeTrait+'b>
55    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
56
57 error: aborting due to 4 previous errors
58
59 Some errors occurred: E0309, E0310.
60 For more information about an error, try `rustc --explain E0309`.