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
Copy file name to clipboardExpand all lines: tests/ui/associated-consts/associated-const-in-trait.stderr
+35-3Lines changed: 35 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
error[E0038]: the trait `Trait` is not dyn compatible
2
-
--> $DIR/associated-const-in-trait.rs:7:10
2
+
--> $DIR/associated-const-in-trait.rs:7:6
3
3
|
4
4
LL | impl dyn Trait {
5
-
| ^^^^^ `Trait` is not dyn compatible
5
+
| ^^^^^^^^^ `Trait` is not dyn compatible
6
6
|
7
7
note: for a trait to be dyn compatible it needs to allow building a vtable
8
8
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
@@ -14,6 +14,38 @@ LL | const N: usize;
14
14
| ^ ...because it contains associated const `N`
15
15
= help: consider moving `N` to another trait
16
16
17
-
error: aborting due to 1 previous error
17
+
error[E0038]: the trait `Trait` is not dyn compatible
18
+
--> $DIR/associated-const-in-trait.rs:9:29
19
+
|
20
+
LL | const fn n() -> usize { Self::N }
21
+
| ^^^^ `Trait` is not dyn compatible
22
+
|
23
+
note: for a trait to be dyn compatible it needs to allow building a vtable
24
+
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
25
+
--> $DIR/associated-const-in-trait.rs:4:11
26
+
|
27
+
LL | trait Trait {
28
+
| ----- this trait is not dyn compatible...
29
+
LL | const N: usize;
30
+
| ^ ...because it contains associated const `N`
31
+
= help: consider moving `N` to another trait
32
+
33
+
error[E0038]: the trait `Trait` is not dyn compatible
34
+
--> $DIR/associated-const-in-trait.rs:9:29
35
+
|
36
+
LL | const fn n() -> usize { Self::N }
37
+
| ^^^^^^^ `Trait` is not dyn compatible
38
+
|
39
+
note: for a trait to be dyn compatible it needs to allow building a vtable
40
+
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
41
+
--> $DIR/associated-const-in-trait.rs:4:11
42
+
|
43
+
LL | trait Trait {
44
+
| ----- this trait is not dyn compatible...
45
+
LL | const N: usize;
46
+
| ^ ...because it contains associated const `N`
47
+
= help: consider moving `N` to another trait
48
+
49
+
error: aborting due to 3 previous errors
18
50
19
51
For more information about this error, try `rustc --explain E0038`.
Copy file name to clipboardExpand all lines: tests/ui/associated-item/issue-48027.stderr
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
error[E0038]: the trait `Bar` is not dyn compatible
2
-
--> $DIR/issue-48027.rs:6:10
2
+
--> $DIR/issue-48027.rs:6:6
3
3
|
4
4
LL | impl dyn Bar {}
5
-
| ^^^ `Bar` is not dyn compatible
5
+
| ^^^^^^^ `Bar` is not dyn compatible
6
6
|
7
7
note: for a trait to be dyn compatible it needs to allow building a vtable
8
8
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
Copy file name to clipboardExpand all lines: tests/ui/dyn-compatibility/associated-consts.stderr
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
error[E0038]: the trait `Bar` is not dyn compatible
2
-
--> $DIR/associated-consts.rs:8:35
2
+
--> $DIR/associated-consts.rs:8:31
3
3
|
4
4
LL | fn make_bar<T:Bar>(t: &T) -> &dyn Bar {
5
-
| ^^^ `Bar` is not dyn compatible
5
+
| ^^^^^^^ `Bar` is not dyn compatible
6
6
|
7
7
note: for a trait to be dyn compatible it needs to allow building a vtable
8
8
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
Copy file name to clipboardExpand all lines: tests/ui/wf/issue-87495.stderr
+7-2Lines changed: 7 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
error[E0038]: the trait `T` is not dyn compatible
2
-
--> $DIR/issue-87495.rs:4:29
2
+
--> $DIR/issue-87495.rs:4:25
3
3
|
4
4
LL | const CONST: (bool, dyn T);
5
-
| ^ `T` is not dyn compatible
5
+
| ^^^^^ `T` is not dyn compatible
6
6
|
7
7
note: for a trait to be dyn compatible it needs to allow building a vtable
8
8
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
@@ -13,6 +13,11 @@ LL | trait T {
13
13
LL | const CONST: (bool, dyn T);
14
14
| ^^^^^ ...because it contains associated const `CONST`
15
15
= help: consider moving `CONST` to another trait
16
+
help: you might have meant to use `Self` to refer to the implementing type
0 commit comments