]> git.proxmox.com Git - rustc.git/blame - src/test/ui/regions/regions-close-over-type-parameter-1.nll.stderr
New upstream version 1.62.1+dfsg1
[rustc.git] / src / test / ui / regions / regions-close-over-type-parameter-1.nll.stderr
CommitLineData
48663c56 1error[E0310]: the parameter type `A` may not live long enough
04454e1e 2 --> $DIR/regions-close-over-type-parameter-1.rs:15:5
48663c56 3 |
c295e0f8 4LL | Box::new(v) as Box<dyn SomeTrait + 'static>
04454e1e 5 | ^^^^^^^^^^^ ...so that the type `A` will meet its required lifetime bounds
48663c56 6 |
04454e1e
FG
7help: consider adding an explicit lifetime bound...
8 |
9LL | fn make_object1<A: SomeTrait + 'static>(v: A) -> Box<dyn SomeTrait + 'static> {
10 | +++++++++
48663c56
XL
11
12error[E0309]: the parameter type `A` may not live long enough
04454e1e 13 --> $DIR/regions-close-over-type-parameter-1.rs:24:5
48663c56 14 |
c295e0f8 15LL | Box::new(v) as Box<dyn SomeTrait + 'b>
04454e1e
FG
16 | ^^^^^^^^^^^ ...so that the type `A` will meet its required lifetime bounds
17 |
18help: consider adding an explicit lifetime bound...
48663c56 19 |
04454e1e
FG
20LL | fn make_object3<'a, 'b, A: SomeTrait + 'a + 'b>(v: A) -> Box<dyn SomeTrait + 'b> {
21 | ++++
48663c56
XL
22
23error: aborting due to 2 previous errors
24
25Some errors have detailed explanations: E0309, E0310.
26For more information about an error, try `rustc --explain E0309`.