summaryrefslogtreecommitdiffstats
path: root/tests/ui/generic-associated-types/bugs/issue-100013.stderr
blob: 86dbad84d99d8930a245fd10532bc66328f038a0 (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
error: lifetime bound not satisfied
  --> $DIR/issue-100013.rs:15:5
   |
LL | /     async { // a generator checked for autotrait impl `Send`
LL | |         let x = None::<I::Future<'_, '_>>; // a type referencing GAT
LL | |         async {}.await; // a yield point
LL | |     }
   | |_____^
   |
note: the lifetime defined here...
  --> $DIR/issue-100013.rs:16:38
   |
LL |         let x = None::<I::Future<'_, '_>>; // a type referencing GAT
   |                                      ^^
note: ...must outlive the lifetime defined here
  --> $DIR/issue-100013.rs:16:34
   |
LL |         let x = None::<I::Future<'_, '_>>; // a type referencing GAT
   |                                  ^^
   = note: this is a known limitation that will be removed in the future (see issue #100013 <https://github.com/rust-lang/rust/issues/100013> for more information)

error: lifetime bound not satisfied
  --> $DIR/issue-100013.rs:22:5
   |
LL | /     async { // a generator checked for autotrait impl `Send`
LL | |         let x = None::<I::Future<'a, 'b>>; // a type referencing GAT
LL | |         async {}.await; // a yield point
LL | |     }
   | |_____^
   |
note: the lifetime `'b` defined here...
  --> $DIR/issue-100013.rs:21:14
   |
LL | fn call2<'a, 'b, I: FutureIterator>() -> impl Send {
   |              ^^
note: ...must outlive the lifetime `'a` defined here
  --> $DIR/issue-100013.rs:21:10
   |
LL | fn call2<'a, 'b, I: FutureIterator>() -> impl Send {
   |          ^^
   = note: this is a known limitation that will be removed in the future (see issue #100013 <https://github.com/rust-lang/rust/issues/100013> for more information)

error: lifetime may not live long enough
  --> $DIR/issue-100013.rs:23:17
   |
LL | fn call2<'a, 'b, I: FutureIterator>() -> impl Send {
   |          --  -- lifetime `'b` defined here
   |          |
   |          lifetime `'a` defined here
LL |     async { // a generator checked for autotrait impl `Send`
LL |         let x = None::<I::Future<'a, 'b>>; // a type referencing GAT
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'b`
   |
   = help: consider adding the following bound: `'a: 'b`

error: lifetime bound not satisfied
  --> $DIR/issue-100013.rs:29:5
   |
LL | /     async { // a generator checked for autotrait impl `Send`
LL | |         let x = None::<I::Future<'a, 'b>>; // a type referencing GAT
LL | |         async {}.await; // a yield point
LL | |     }
   | |_____^
   |
note: the lifetime `'b` defined here...
  --> $DIR/issue-100013.rs:28:18
   |
LL | fn call3<'a: 'b, 'b, I: FutureIterator>() -> impl Send {
   |                  ^^
note: ...must outlive the lifetime `'a` defined here
  --> $DIR/issue-100013.rs:28:10
   |
LL | fn call3<'a: 'b, 'b, I: FutureIterator>() -> impl Send {
   |          ^^
   = note: this is a known limitation that will be removed in the future (see issue #100013 <https://github.com/rust-lang/rust/issues/100013> for more information)

error: aborting due to 4 previous errors