You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #142712 - davidtwco:sized-hierarchy-missing-default-bounds, r=<try>
hir_analysis: add missing sizedness bounds
Default sizedness bounds were not being added to `explicit_super_predicates_of` and `explicit_implied_predicates_of` which meant that a trait bound added to a associated type projection would be missing the implied predicate of the default sizedness supertrait of that trait.
An unexpected consequence of this change was that the check for multiple principals was now finding an additional `MetaSized` principal when eagerly expanding trait aliases - this required modifying lowering to no longer add default bounds to trait aliases.
LL | / async { // a coroutine 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: 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)
11
-
12
-
error: lifetime bound not satisfied
13
-
--> $DIR/issue-100013.rs:22:5
14
-
|
15
-
LL | / async { // a coroutine checked for autotrait impl `Send`
16
-
LL | | let x = None::<I::Future<'a, 'b>>; // a type referencing GAT
17
-
LL | | async {}.await; // a yield point
18
-
LL | | }
19
-
| |_____^
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
1
error: lifetime may not live long enough
24
2
--> $DIR/issue-100013.rs:23:17
25
3
|
@@ -33,16 +11,5 @@ LL | let x = None::<I::Future<'a, 'b>>; // a type referencing GAT
33
11
|
34
12
= help: consider adding the following bound: `'a: 'b`
35
13
36
-
error: lifetime bound not satisfied
37
-
--> $DIR/issue-100013.rs:29:5
38
-
|
39
-
LL | / async { // a coroutine checked for autotrait impl `Send`
40
-
LL | | let x = None::<I::Future<'a, 'b>>; // a type referencing GAT
41
-
LL | | async {}.await; // a yield point
42
-
LL | | }
43
-
| |_____^
44
-
|
45
-
= 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)
0 commit comments