fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

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