Fix tests that fail with --emit metadata
This commit is contained in:
parent
232c1f331c
commit
9930e1ff0a
@ -1,9 +1,9 @@
|
||||
// compile-fail
|
||||
// build-fail
|
||||
|
||||
// Cyclic assoc. const defaults don't error unless *used*
|
||||
trait Tr {
|
||||
const A: u8 = Self::B;
|
||||
//~^ ERROR cycle detected when const-evaluating `Tr::A`
|
||||
//~^ ERROR cycle detected when const-evaluating + checking `Tr::A`
|
||||
|
||||
const B: u8 = Self::A;
|
||||
}
|
||||
|
@ -1,15 +1,25 @@
|
||||
error[E0391]: cycle detected when const-evaluating `Tr::A`
|
||||
error[E0391]: cycle detected when const-evaluating + checking `Tr::A`
|
||||
--> $DIR/defaults-cyclic-fail.rs:5:5
|
||||
|
|
||||
LL | const A: u8 = Self::B;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: ...which requires const-evaluating `Tr::A`...
|
||||
--> $DIR/defaults-cyclic-fail.rs:5:19
|
||||
|
|
||||
LL | const A: u8 = Self::B;
|
||||
| ^^^^^^^
|
||||
note: ...which requires const-evaluating + checking `Tr::B`...
|
||||
--> $DIR/defaults-cyclic-fail.rs:8:5
|
||||
|
|
||||
LL | const B: u8 = Self::A;
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^
|
||||
note: ...which requires const-evaluating `Tr::B`...
|
||||
--> $DIR/defaults-cyclic-fail.rs:8:19
|
||||
|
|
||||
LL | const B: u8 = Self::A;
|
||||
| ^^^^^^^
|
||||
= note: ...which again requires const-evaluating `Tr::A`, completing the cycle
|
||||
= note: ...which again requires const-evaluating + checking `Tr::A`, completing the cycle
|
||||
note: cycle used when const-evaluating `main`
|
||||
--> $DIR/defaults-cyclic-fail.rs:16:16
|
||||
|
|
||||
|
@ -1,4 +1,4 @@
|
||||
// compile-fail
|
||||
// build-fail
|
||||
|
||||
trait Tr {
|
||||
const A: u8 = 255;
|
||||
|
Loading…
Reference in New Issue
Block a user