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