Skip to content

Commit 9930e1f

Browse files
Fix tests that fail with --emit metadata
1 parent 232c1f3 commit 9930e1f

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

src/test/ui/associated-const/defaults-cyclic-fail.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
// compile-fail
1+
// build-fail
22

33
// Cyclic assoc. const defaults don't error unless *used*
44
trait Tr {
55
const A: u8 = Self::B;
6-
//~^ ERROR cycle detected when const-evaluating `Tr::A`
6+
//~^ ERROR cycle detected when const-evaluating + checking `Tr::A`
77

88
const B: u8 = Self::A;
99
}

src/test/ui/associated-const/defaults-cyclic-fail.stderr

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
1-
error[E0391]: cycle detected when const-evaluating `Tr::A`
1+
error[E0391]: cycle detected when const-evaluating + checking `Tr::A`
2+
--> $DIR/defaults-cyclic-fail.rs:5:5
3+
|
4+
LL | const A: u8 = Self::B;
5+
| ^^^^^^^^^^^^^^^^^^^^^^
6+
|
7+
note: ...which requires const-evaluating `Tr::A`...
28
--> $DIR/defaults-cyclic-fail.rs:5:19
39
|
410
LL | const A: u8 = Self::B;
511
| ^^^^^^^
12+
note: ...which requires const-evaluating + checking `Tr::B`...
13+
--> $DIR/defaults-cyclic-fail.rs:8:5
614
|
15+
LL | const B: u8 = Self::A;
16+
| ^^^^^^^^^^^^^^^^^^^^^^
717
note: ...which requires const-evaluating `Tr::B`...
818
--> $DIR/defaults-cyclic-fail.rs:8:19
919
|
1020
LL | const B: u8 = Self::A;
1121
| ^^^^^^^
12-
= note: ...which again requires const-evaluating `Tr::A`, completing the cycle
22+
= note: ...which again requires const-evaluating + checking `Tr::A`, completing the cycle
1323
note: cycle used when const-evaluating `main`
1424
--> $DIR/defaults-cyclic-fail.rs:16:16
1525
|

src/test/ui/associated-const/defaults-not-assumed-fail.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// compile-fail
1+
// build-fail
22

33
trait Tr {
44
const A: u8 = 255;

0 commit comments

Comments
 (0)