]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/issue-85113.stderr
Auto merge of #86467 - ChrisDenton:win-env-clear, r=JohnTitor
[rust.git] / src / test / ui / type-alias-impl-trait / issue-85113.stderr
1 error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
2   --> $DIR/issue-85113.rs:5:29
3    |
4 LL | type OpaqueOutputImpl<'a> = impl Output<'a> + 'a;
5    |                             ^^^^^^^^^^^^^^^^^^^^
6    |
7 note: hidden type `&'<empty> str` captures lifetime smaller than the function body
8   --> $DIR/issue-85113.rs:5:29
9    |
10 LL | type OpaqueOutputImpl<'a> = impl Output<'a> + 'a;
11    |                             ^^^^^^^^^^^^^^^^^^^^
12
13 error[E0477]: the type `&'<empty> str` does not fulfill the required lifetime
14   --> $DIR/issue-85113.rs:5:29
15    |
16 LL | type OpaqueOutputImpl<'a> = impl Output<'a> + 'a;
17    |                             ^^^^^^^^^^^^^^^^^^^^
18    |
19 note: type must outlive the lifetime `'a` as defined on the item at 5:23
20   --> $DIR/issue-85113.rs:5:23
21    |
22 LL | type OpaqueOutputImpl<'a> = impl Output<'a> + 'a;
23    |                       ^^
24
25 error[E0495]: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requirements
26   --> $DIR/issue-85113.rs:5:29
27    |
28 LL | type OpaqueOutputImpl<'a> = impl Output<'a> + 'a;
29    |                             ^^^^^^^^^^^^^^^^^^^^
30    |
31    = note: first, the lifetime cannot outlive the empty lifetime...
32 note: ...but the lifetime must also be valid for the lifetime `'a` as defined on the item at 5:23...
33   --> $DIR/issue-85113.rs:5:23
34    |
35 LL | type OpaqueOutputImpl<'a> = impl Output<'a> + 'a;
36    |                       ^^
37 note: ...so that the types are compatible
38   --> $DIR/issue-85113.rs:5:29
39    |
40 LL | type OpaqueOutputImpl<'a> = impl Output<'a> + 'a;
41    |                             ^^^^^^^^^^^^^^^^^^^^
42    = note: expected `Output<'a>`
43               found `Output<'_>`
44
45 error: aborting due to 3 previous errors
46
47 Some errors have detailed explanations: E0477, E0495, E0700.
48 For more information about an error, try `rustc --explain E0477`.