]> git.lizzy.rs Git - rust.git/blob - tests/ui/generic-associated-types/bugs/issue-100013.stderr
Rollup merge of #105172 - alexs-sh:issue-98861-fix-next, r=scottmcm
[rust.git] / tests / ui / generic-associated-types / bugs / issue-100013.stderr
1 error: lifetime bound not satisfied
2   --> $DIR/issue-100013.rs:15:5
3    |
4 LL | /     async { // a generator checked for autotrait impl `Send`
5 LL | |
6 LL | |         let x = None::<I::Future<'_, '_>>; // a type referencing GAT
7 LL | |         async {}.await; // a yield point
8 LL | |     }
9    | |_____^
10    |
11 note: the lifetime defined here...
12   --> $DIR/issue-100013.rs:17:38
13    |
14 LL |         let x = None::<I::Future<'_, '_>>; // a type referencing GAT
15    |                                      ^^
16 note: ...must outlive the lifetime defined here
17   --> $DIR/issue-100013.rs:17:34
18    |
19 LL |         let x = None::<I::Future<'_, '_>>; // a type referencing GAT
20    |                                  ^^
21    = 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)
22
23 error: lifetime bound not satisfied
24   --> $DIR/issue-100013.rs:23:5
25    |
26 LL | /     async { // a generator checked for autotrait impl `Send`
27 LL | |
28 LL | |         let x = None::<I::Future<'a, 'b>>; // a type referencing GAT
29 LL | |
30 LL | |         async {}.await; // a yield point
31 LL | |     }
32    | |_____^
33    |
34 note: the lifetime defined here...
35   --> $DIR/issue-100013.rs:22:14
36    |
37 LL | fn call2<'a, 'b, I: FutureIterator>() -> impl Send {
38    |              ^^
39 note: ...must outlive the lifetime defined here
40   --> $DIR/issue-100013.rs:22:10
41    |
42 LL | fn call2<'a, 'b, I: FutureIterator>() -> impl Send {
43    |          ^^
44    = 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)
45
46 error: lifetime may not live long enough
47   --> $DIR/issue-100013.rs:25:17
48    |
49 LL | fn call2<'a, 'b, I: FutureIterator>() -> impl Send {
50    |          --  -- lifetime `'b` defined here
51    |          |
52    |          lifetime `'a` defined here
53 ...
54 LL |         let x = None::<I::Future<'a, 'b>>; // a type referencing GAT
55    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'b`
56    |
57    = help: consider adding the following bound: `'a: 'b`
58
59 error: lifetime bound not satisfied
60   --> $DIR/issue-100013.rs:32:5
61    |
62 LL | /     async { // a generator checked for autotrait impl `Send`
63 LL | |
64 LL | |         let x = None::<I::Future<'a, 'b>>; // a type referencing GAT
65 LL | |         async {}.await; // a yield point
66 LL | |     }
67    | |_____^
68    |
69 note: the lifetime defined here...
70   --> $DIR/issue-100013.rs:31:18
71    |
72 LL | fn call3<'a: 'b, 'b, I: FutureIterator>() -> impl Send {
73    |                  ^^
74 note: ...must outlive the lifetime defined here
75   --> $DIR/issue-100013.rs:31:10
76    |
77 LL | fn call3<'a: 'b, 'b, I: FutureIterator>() -> impl Send {
78    |          ^^
79    = 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)
80
81 error: aborting due to 4 previous errors
82