Add regression test
This commit is contained in:
parent
bc0170a43b
commit
6f543d5ceb
2 changed files with 23 additions and 0 deletions
5
tests/ui/parallel-rustc/cycle_crash.rs
Normal file
5
tests/ui/parallel-rustc/cycle_crash.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
//@ compile-flags: -Z threads=2
|
||||
|
||||
const FOO: usize = FOO; //~ERROR cycle detected when simplifying constant for the type system `FOO`
|
||||
|
||||
fn main() {}
|
18
tests/ui/parallel-rustc/cycle_crash.stderr
Normal file
18
tests/ui/parallel-rustc/cycle_crash.stderr
Normal file
|
@ -0,0 +1,18 @@
|
|||
error[E0391]: cycle detected when simplifying constant for the type system `FOO`
|
||||
--> $DIR/cycle_crash.rs:3:1
|
||||
|
|
||||
LL | const FOO: usize = FOO;
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
note: ...which requires const-evaluating + checking `FOO`...
|
||||
--> $DIR/cycle_crash.rs:3:20
|
||||
|
|
||||
LL | const FOO: usize = FOO;
|
||||
| ^^^
|
||||
= note: ...which again requires simplifying constant for the type system `FOO`, completing the cycle
|
||||
= note: cycle used when running analysis passes on this crate
|
||||
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0391`.
|
Loading…
Add table
Add a link
Reference in a new issue