]> git.proxmox.com Git - rustc.git/blame_incremental - 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
1error[E0310]: the parameter type `A` may not live long enough
2 --> $DIR/regions-close-over-type-parameter-1.rs:15:5
3 |
4LL | Box::new(v) as Box<dyn SomeTrait + 'static>
5 | ^^^^^^^^^^^ ...so that the type `A` will meet its required lifetime bounds
6 |
7help: consider adding an explicit lifetime bound...
8 |
9LL | fn make_object1<A: SomeTrait + 'static>(v: A) -> Box<dyn SomeTrait + 'static> {
10 | +++++++++
11
12error[E0309]: the parameter type `A` may not live long enough
13 --> $DIR/regions-close-over-type-parameter-1.rs:24:5
14 |
15LL | Box::new(v) as Box<dyn SomeTrait + 'b>
16 | ^^^^^^^^^^^ ...so that the type `A` will meet its required lifetime bounds
17 |
18help: consider adding an explicit lifetime bound...
19 |
20LL | fn make_object3<'a, 'b, A: SomeTrait + 'a + 'b>(v: A) -> Box<dyn SomeTrait + 'b> {
21 | ++++
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`.