]> git.proxmox.com Git - rustc.git/blame - src/test/ui/type-alias-impl-trait/closure_wf_outlives.stderr
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / type-alias-impl-trait / closure_wf_outlives.stderr
CommitLineData
2b03887a
FG
1error[E0478]: lifetime bound not satisfied
2 --> $DIR/closure_wf_outlives.rs:14:27
3 |
4LL | type Opaque<'a, 'b> = impl Sized + 'a + 'b;
5 | ^^^^^^^^^^^^^^^^^^^^
6 |
7note: lifetime parameter instantiated with the lifetime `'a` as defined here
8 --> $DIR/closure_wf_outlives.rs:14:17
9 |
10LL | type Opaque<'a, 'b> = impl Sized + 'a + 'b;
11 | ^^
12note: but lifetime parameter must outlive the lifetime `'b` as defined here
13 --> $DIR/closure_wf_outlives.rs:14:21
14 |
15LL | type Opaque<'a, 'b> = impl Sized + 'a + 'b;
16 | ^^
17
18error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
19 --> $DIR/closure_wf_outlives.rs:27:27
20 |
21LL | type Opaque<'a, 'b> = impl Sized + 'a + 'b;
22 | ^^^^^^^^^^^^^^^^^^^^
23 |
24note: first, the lifetime cannot outlive the lifetime `'a` as defined here...
25 --> $DIR/closure_wf_outlives.rs:27:17
26 |
27LL | type Opaque<'a, 'b> = impl Sized + 'a + 'b;
28 | ^^
29note: ...so that the declared lifetime parameter bounds are satisfied
30 --> $DIR/closure_wf_outlives.rs:27:27
31 |
32LL | type Opaque<'a, 'b> = impl Sized + 'a + 'b;
33 | ^^^^^^^^^^^^^^^^^^^^
34note: but, the lifetime must be valid for the lifetime `'b` as defined here...
35 --> $DIR/closure_wf_outlives.rs:27:21
36 |
37LL | type Opaque<'a, 'b> = impl Sized + 'a + 'b;
38 | ^^
39note: ...so that the declared lifetime parameter bounds are satisfied
40 --> $DIR/closure_wf_outlives.rs:27:27
41 |
42LL | type Opaque<'a, 'b> = impl Sized + 'a + 'b;
43 | ^^^^^^^^^^^^^^^^^^^^
44
45error[E0310]: the parameter type `T` may not live long enough
46 --> $DIR/closure_wf_outlives.rs:54:22
47 |
48LL | type Opaque<T> = impl Sized;
49 | ^^^^^^^^^^ ...so that the type `T` will meet its required lifetime bounds...
50 |
51note: ...that is required by this bound
52 --> $DIR/closure_wf_outlives.rs:59:12
53 |
54LL | T: 'static,
55 | ^^^^^^^
56help: consider adding an explicit lifetime bound...
57 |
58LL | type Opaque<T: 'static> = impl Sized;
59 | +++++++++
60
61error: aborting due to 3 previous errors
62
63Some errors have detailed explanations: E0310, E0478, E0495.
64For more information about an error, try `rustc --explain E0310`.