about summary refs log tree commit diff
path: root/src/test/ui/async-await/multiple-lifetimes/ret-impl-trait-no-fg.stderr
blob: da584e8ad4e0d2dd1907ca5491fd4158073381c9 (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
error: ambiguous lifetime bound in `impl Trait`
  --> $DIR/ret-impl-trait-no-fg.rs:9:64
   |
LL | async fn async_ret_impl_trait<'a, 'b>(a: &'a u8, b: &'b u8) -> impl Trait<'a, 'b> {
   |                                                                ^^^^^^^^^^^^^^^^^^ neither `'a` nor `'b` outlives the other
   |
   = help: add #![feature(member_constraints)] to the crate attributes to enable

error: ambiguous lifetime bound in `impl Trait`
  --> $DIR/ret-impl-trait-no-fg.rs:9:64
   |
LL | async fn async_ret_impl_trait<'a, 'b>(a: &'a u8, b: &'b u8) -> impl Trait<'a, 'b> {
   |                                                                ^^^^^^^^^^^^^^^^^^ neither `'a` nor `'b` outlives the other
   |
   = help: add #![feature(member_constraints)] to the crate attributes to enable

error: ambiguous lifetime bound in `impl Trait`
  --> $DIR/ret-impl-trait-no-fg.rs:9:64
   |
LL | async fn async_ret_impl_trait<'a, 'b>(a: &'a u8, b: &'b u8) -> impl Trait<'a, 'b> {
   |                                                                ^^^^^^^^^^^^^^^^^^ the elided lifetimes here do not outlive one another
   |
   = help: add #![feature(member_constraints)] to the crate attributes to enable

error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
  --> $DIR/ret-impl-trait-no-fg.rs:9:1
   |
LL | / async fn async_ret_impl_trait<'a, 'b>(a: &'a u8, b: &'b u8) -> impl Trait<'a, 'b> {
LL | |
LL | |
LL | |
...  |
LL | |     (a, b)
LL | | }
   | |_^
   |
   = note: hidden type `(&u8, &u8)` captures lifetime '_#5r

error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
  --> $DIR/ret-impl-trait-no-fg.rs:9:1
   |
LL | / async fn async_ret_impl_trait<'a, 'b>(a: &'a u8, b: &'b u8) -> impl Trait<'a, 'b> {
LL | |
LL | |
LL | |
...  |
LL | |     (a, b)
LL | | }
   | |_^
   |
   = note: hidden type `(&u8, &u8)` captures lifetime '_#6r

error: aborting due to 5 previous errors

For more information about this error, try `rustc --explain E0700`.