]> git.proxmox.com Git - rustc.git/blob - src/test/ui/regions/regions-close-object-into-object-5.nll.stderr
New upstream version 1.57.0+dfsg1
[rustc.git] / src / test / ui / regions / regions-close-object-into-object-5.nll.stderr
1 error[E0310]: the parameter type `T` may not live long enough
2 --> $DIR/regions-close-object-into-object-5.rs:17:5
3 |
4 LL | Box::new(B(&*v)) as Box<dyn X>
5 | ^^^^^^^^
6 |
7 = help: consider adding an explicit lifetime bound `T: 'static`...
8
9 error[E0310]: the parameter type `T` may not live long enough
10 --> $DIR/regions-close-object-into-object-5.rs:17:5
11 |
12 LL | Box::new(B(&*v)) as Box<dyn X>
13 | ^^^^^^^^^^^^^^^^
14 |
15 = help: consider adding an explicit lifetime bound `T: 'static`...
16
17 error[E0310]: the parameter type `T` may not live long enough
18 --> $DIR/regions-close-object-into-object-5.rs:17:5
19 |
20 LL | Box::new(B(&*v)) as Box<dyn X>
21 | ^^^^^^^^^^^^^^^^
22 |
23 = help: consider adding an explicit lifetime bound `T: 'static`...
24
25 error[E0515]: cannot return value referencing local data `*v`
26 --> $DIR/regions-close-object-into-object-5.rs:17:5
27 |
28 LL | Box::new(B(&*v)) as Box<dyn X>
29 | ^^^^^^^^^^^---^^^^^^^^^^^^^^^^
30 | | |
31 | | `*v` is borrowed here
32 | returns a value referencing data owned by the current function
33
34 error[E0310]: the parameter type `T` may not live long enough
35 --> $DIR/regions-close-object-into-object-5.rs:17:14
36 |
37 LL | Box::new(B(&*v)) as Box<dyn X>
38 | ^^^^^^
39 |
40 = help: consider adding an explicit lifetime bound `T: 'static`...
41
42 error: aborting due to 5 previous errors
43
44 Some errors have detailed explanations: E0310, E0515.
45 For more information about an error, try `rustc --explain E0310`.