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 #120812 - compiler-errors:impl-sorting, r=lcnr
Remove unnecessary impl sorting in queries and metadata
Removes unnecessary impl sorting because queries already return their keys in HIR definition order: #120371 (comment)
r? `@cjgillot` or `@lcnr` -- unless I totally misunderstood what was being asked for here? 😆
fixes#120371
Copy file name to clipboardExpand all lines: tests/ui/generic-associated-types/gat-in-trait-path.base.stderr
+3-3
Original file line number
Diff line number
Diff line change
@@ -13,8 +13,8 @@ LL | type A<'a> where Self: 'a;
13
13
| ^ ...because it contains the generic associated type `A`
14
14
= help: consider moving `A` to another trait
15
15
= help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `Foo` for this new enum and using it instead:
16
-
Fooer<T>
17
16
Fooy
17
+
Fooer<T>
18
18
19
19
error[E0038]: the trait `Foo` cannot be made into an object
20
20
--> $DIR/gat-in-trait-path.rs:32:5
@@ -31,8 +31,8 @@ LL | type A<'a> where Self: 'a;
31
31
| ^ ...because it contains the generic associated type `A`
32
32
= help: consider moving `A` to another trait
33
33
= help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `Foo` for this new enum and using it instead:
34
-
Fooer<T>
35
34
Fooy
35
+
Fooer<T>
36
36
37
37
error[E0038]: the trait `Foo` cannot be made into an object
38
38
--> $DIR/gat-in-trait-path.rs:32:5
@@ -49,8 +49,8 @@ LL | type A<'a> where Self: 'a;
49
49
| ^ ...because it contains the generic associated type `A`
50
50
= help: consider moving `A` to another trait
51
51
= help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `Foo` for this new enum and using it instead:
52
-
Fooer<T>
53
52
Fooy
53
+
Fooer<T>
54
54
= note: required for the cast from `Box<Fooer<{integer}>>` to `Box<(dyn Foo<A = &'a ()> + 'static)>`
Copy file name to clipboardExpand all lines: tests/ui/generic-associated-types/issue-79422.base.stderr
+2-2
Original file line number
Diff line number
Diff line change
@@ -29,8 +29,8 @@ LL | type VRefCont<'a>: RefCont<'a, V> where Self: 'a;
29
29
| ^^^^^^^^ ...because it contains the generic associated type `VRefCont`
30
30
= help: consider moving `VRefCont` to another trait
31
31
= help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `MapLike` for this new enum and using it instead:
32
-
Source
33
32
std::collections::BTreeMap<K, V>
33
+
Source
34
34
35
35
error[E0038]: the trait `MapLike` cannot be made into an object
36
36
--> $DIR/issue-79422.rs:44:13
@@ -47,8 +47,8 @@ LL | type VRefCont<'a>: RefCont<'a, V> where Self: 'a;
47
47
| ^^^^^^^^ ...because it contains the generic associated type `VRefCont`
48
48
= help: consider moving `VRefCont` to another trait
49
49
= help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `MapLike` for this new enum and using it instead:
50
-
Source
51
50
std::collections::BTreeMap<K, V>
51
+
Source
52
52
= note: required for the cast from `Box<BTreeMap<u8, u8>>` to `Box<dyn MapLike<u8, u8, VRefCont = (dyn RefCont<'_, u8> + 'static)>>`
Copy file name to clipboardExpand all lines: tests/ui/wf/wf-unsafe-trait-obj-match.stderr
+2-2
Original file line number
Diff line number
Diff line change
@@ -26,8 +26,8 @@ LL | trait Trait: Sized {}
26
26
| |
27
27
| this trait cannot be made into an object...
28
28
= help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `Trait` for this new enum and using it instead:
29
-
R
30
29
S
30
+
R
31
31
= note: required for the cast from `&S` to `&dyn Trait`
32
32
33
33
error[E0038]: the trait `Trait` cannot be made into an object
@@ -48,8 +48,8 @@ LL | trait Trait: Sized {}
48
48
| |
49
49
| this trait cannot be made into an object...
50
50
= help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `Trait` for this new enum and using it instead:
51
-
R
52
51
S
52
+
R
53
53
= note: required for the cast from `&R` to `&dyn Trait`
0 commit comments