Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Cycle errors are caught during const-checking again
  • Loading branch information
ecstatic-morse committed Apr 24, 2020
commit 36085351a97f98708c235870c7122147a8723269
21 changes: 5 additions & 16 deletions src/test/ui/issues/issue-17252.stderr
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
error[E0391]: cycle detected when normalizing `FOO`
|
note: ...which requires const-evaluating + checking `FOO`...
--> $DIR/issue-17252.rs:1:1
|
LL | const FOO: usize = FOO;
| ^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires const-evaluating + checking `FOO`...
--> $DIR/issue-17252.rs:1:1
error[E0391]: cycle detected when const checking `FOO`
--> $DIR/issue-17252.rs:1:20
|
LL | const FOO: usize = FOO;
| ^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires const-evaluating `FOO`...
--> $DIR/issue-17252.rs:1:1
| ^^^
|
LL | const FOO: usize = FOO;
| ^^^^^^^^^^^^^^^^^^^^^^^
= note: ...which again requires normalizing `FOO`, completing the cycle
note: cycle used when const-evaluating `main::{{constant}}#0`
= note: ...which again requires const checking `FOO`, completing the cycle
note: cycle used when const checking `main::{{constant}}#0`
--> $DIR/issue-17252.rs:4:18
|
LL | let _x: [u8; FOO]; // caused stack overflow prior to fix
Expand Down
17 changes: 3 additions & 14 deletions src/test/ui/issues/issue-23302-1.stderr
Original file line number Diff line number Diff line change
@@ -1,26 +1,15 @@
error[E0391]: cycle detected when const-evaluating + checking `X::A::{{constant}}#0`
error[E0391]: cycle detected when const checking `X::A::{{constant}}#0`
--> $DIR/issue-23302-1.rs:4:9
|
LL | A = X::A as isize,
| ^^^^^^^^^^^^^
|
note: ...which requires const-evaluating + checking `X::A::{{constant}}#0`...
= note: ...which again requires const checking `X::A::{{constant}}#0`, completing the cycle
note: cycle used when processing `X::A::{{constant}}#0`
--> $DIR/issue-23302-1.rs:4:9
|
LL | A = X::A as isize,
| ^^^^^^^^^^^^^
note: ...which requires const-evaluating `X::A::{{constant}}#0`...
--> $DIR/issue-23302-1.rs:4:9
|
LL | A = X::A as isize,
| ^^^^^^^^^^^^^
= note: ...which requires normalizing `X::A as isize`...
= note: ...which again requires const-evaluating + checking `X::A::{{constant}}#0`, completing the cycle
note: cycle used when collecting item types in top-level module
--> $DIR/issue-23302-1.rs:3:1
|
LL | enum X {
| ^^^^^^

error: aborting due to previous error

Expand Down
17 changes: 3 additions & 14 deletions src/test/ui/issues/issue-23302-2.stderr
Original file line number Diff line number Diff line change
@@ -1,26 +1,15 @@
error[E0391]: cycle detected when const-evaluating + checking `Y::A::{{constant}}#0`
error[E0391]: cycle detected when const checking `Y::A::{{constant}}#0`
--> $DIR/issue-23302-2.rs:4:9
|
LL | A = Y::B as isize,
| ^^^^^^^^^^^^^
|
note: ...which requires const-evaluating + checking `Y::A::{{constant}}#0`...
= note: ...which again requires const checking `Y::A::{{constant}}#0`, completing the cycle
note: cycle used when processing `Y::A::{{constant}}#0`
--> $DIR/issue-23302-2.rs:4:9
|
LL | A = Y::B as isize,
| ^^^^^^^^^^^^^
note: ...which requires const-evaluating `Y::A::{{constant}}#0`...
--> $DIR/issue-23302-2.rs:4:9
|
LL | A = Y::B as isize,
| ^^^^^^^^^^^^^
= note: ...which requires normalizing `Y::B as isize`...
= note: ...which again requires const-evaluating + checking `Y::A::{{constant}}#0`, completing the cycle
note: cycle used when collecting item types in top-level module
--> $DIR/issue-23302-2.rs:3:1
|
LL | enum Y {
| ^^^^^^

error: aborting due to previous error

Expand Down
36 changes: 9 additions & 27 deletions src/test/ui/issues/issue-23302-3.stderr
Original file line number Diff line number Diff line change
@@ -1,38 +1,20 @@
error[E0391]: cycle detected when const-evaluating + checking `A`
--> $DIR/issue-23302-3.rs:1:1
error[E0391]: cycle detected when const checking `A`
--> $DIR/issue-23302-3.rs:1:16
|
LL | const A: i32 = B;
| ^^^^^^^^^^^^^^^^^
| ^
|
note: ...which requires const-evaluating + checking `A`...
--> $DIR/issue-23302-3.rs:1:1
note: ...which requires const checking `B`...
--> $DIR/issue-23302-3.rs:3:16
|
LL | const A: i32 = B;
| ^^^^^^^^^^^^^^^^^
note: ...which requires const-evaluating `A`...
LL | const B: i32 = A;
| ^
= note: ...which again requires const checking `A`, completing the cycle
note: cycle used when processing `A`
--> $DIR/issue-23302-3.rs:1:1
|
LL | const A: i32 = B;
| ^^^^^^^^^^^^^^^^^
= note: ...which requires normalizing `B`...
note: ...which requires const-evaluating + checking `B`...
--> $DIR/issue-23302-3.rs:3:1
|
LL | const B: i32 = A;
| ^^^^^^^^^^^^^^^^^
note: ...which requires const-evaluating + checking `B`...
--> $DIR/issue-23302-3.rs:3:1
|
LL | const B: i32 = A;
| ^^^^^^^^^^^^^^^^^
note: ...which requires const-evaluating `B`...
--> $DIR/issue-23302-3.rs:3:1
|
LL | const B: i32 = A;
| ^^^^^^^^^^^^^^^^^
= note: ...which requires normalizing `A`...
= note: ...which again requires const-evaluating + checking `A`, completing the cycle
= note: cycle used when running analysis passes on this crate

error: aborting due to previous error

Expand Down
42 changes: 7 additions & 35 deletions src/test/ui/issues/issue-36163.stderr
Original file line number Diff line number Diff line change
@@ -1,48 +1,20 @@
error[E0391]: cycle detected when const-evaluating + checking `Foo::B::{{constant}}#0`
error[E0391]: cycle detected when const checking `Foo::B::{{constant}}#0`
--> $DIR/issue-36163.rs:4:9
|
LL | B = A,
| ^
|
note: ...which requires const-evaluating + checking `Foo::B::{{constant}}#0`...
--> $DIR/issue-36163.rs:4:9
note: ...which requires const checking `A`...
--> $DIR/issue-36163.rs:1:18
|
LL | B = A,
| ^
note: ...which requires const-evaluating `Foo::B::{{constant}}#0`...
LL | const A: isize = Foo::B as isize;
| ^^^^^^^^^^^^^^^
= note: ...which again requires const checking `Foo::B::{{constant}}#0`, completing the cycle
note: cycle used when processing `Foo::B::{{constant}}#0`
--> $DIR/issue-36163.rs:4:9
|
LL | B = A,
| ^
= note: ...which requires normalizing `A`...
note: ...which requires const-evaluating + checking `A`...
--> $DIR/issue-36163.rs:1:1
|
LL | const A: isize = Foo::B as isize;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires const-evaluating + checking `A`...
--> $DIR/issue-36163.rs:1:1
|
LL | const A: isize = Foo::B as isize;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires const-evaluating `A`...
--> $DIR/issue-36163.rs:1:1
|
LL | const A: isize = Foo::B as isize;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: ...which requires normalizing `A`...
= note: ...which again requires const-evaluating + checking `Foo::B::{{constant}}#0`, completing the cycle
note: cycle used when collecting item types in top-level module
--> $DIR/issue-36163.rs:1:1
|
LL | / const A: isize = Foo::B as isize;
LL | |
LL | | enum Foo {
LL | | B = A,
LL | | }
LL | |
LL | | fn main() {}
| |____________^

error: aborting due to previous error

Expand Down