fork/rust

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

borsAuto merge of #69444 - pietroalbini:stable-next-final-v2-new, r=pietroalbinif3e1a954d2e

1.41.1
964 B29 linesraw
1error[E0310]: the parameter type `T` may not live long enough
2  --> $DIR/regions-close-object-into-object-5.rs:17:5
3   |
4LL |     box B(&*v) as Box<X>
5   |     ^^^^^^^^^^
6   |
7   = help: consider adding an explicit lifetime bound `T: 'static`...
8
9error[E0515]: cannot return value referencing local data `*v`
10  --> $DIR/regions-close-object-into-object-5.rs:17:5
11   |
12LL |     box B(&*v) as Box<X>
13   |     ^^^^^^---^^^^^^^^^^^
14   |     |     |
15   |     |     `*v` is borrowed here
16   |     returns a value referencing data owned by the current function
17
18error[E0310]: the parameter type `T` may not live long enough
19  --> $DIR/regions-close-object-into-object-5.rs:17:9
20   |
21LL |     box B(&*v) as Box<X>
22   |         ^^^^^^
23   |
24   = help: consider adding an explicit lifetime bound `T: 'static`...
25
26error: aborting due to 3 previous errors
27
28Some errors have detailed explanations: E0310, E0515.
29For more information about an error, try `rustc --explain E0310`.