summaryrefslogtreecommitdiffstats
path: root/tests/ui/regions/regions-close-over-type-parameter-1.stderr
blob: b7b557d7a60a4fe9344ca22911bd72a5240cf952 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
error[E0310]: the parameter type `A` may not live long enough
  --> $DIR/regions-close-over-type-parameter-1.rs:11:5
   |
LL |     Box::new(v) as Box<dyn SomeTrait + 'static>
   |     ^^^^^^^^^^^ ...so that the type `A` will meet its required lifetime bounds
   |
help: consider adding an explicit lifetime bound...
   |
LL | fn make_object1<A: SomeTrait + 'static>(v: A) -> Box<dyn SomeTrait + 'static> {
   |                              +++++++++

error[E0309]: the parameter type `A` may not live long enough
  --> $DIR/regions-close-over-type-parameter-1.rs:20:5
   |
LL |     Box::new(v) as Box<dyn SomeTrait + 'b>
   |     ^^^^^^^^^^^ ...so that the type `A` will meet its required lifetime bounds
   |
help: consider adding an explicit lifetime bound...
   |
LL | fn make_object3<'a, 'b, A: SomeTrait + 'a + 'b>(v: A) -> Box<dyn SomeTrait + 'b> {
   |                                           ++++

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0309, E0310.
For more information about an error, try `rustc --explain E0309`.