-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Compiler panics during incremental recompilation, while using an associated constant as array size #54242
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Do you experience an ICE on the latest nightly?
error[E0391]: cycle detected when const-evaluating `<impl at src/main.rs:9:1: 11:2>::Arr::{{constant}}`
--> src/main.rs:10:21
|
10 | type Arr = [u8; Self::C];
| ^^^^^^^
|
note: ...which requires processing `<impl at src/main.rs:9:1: 11:2>::Arr::{{constant}}`...
--> src/main.rs:10:21
|
10 | type Arr = [u8; Self::C];
| ^^^^^^^
= note: ...which again requires const-evaluating `<impl at src/main.rs:9:1: 11:2>::Arr::{{constant}}`, completing the cycle
note: cycle used when processing `<impl at src/main.rs:9:1: 11:2>`
--> src/main.rs:9:1
|
9 | impl Tr for str {
| ^^^^^^^^^^^^^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0391`. |
No longer occurs on |
The same cycle detected error occurs on current stable as well. Edit: The same cycle error, with some minor tweaks to diagnostic wording, occurs on every stable version since 1.20. Associated constants were experimental in 1.19. |
I guess this should work, given that |
In hindsight, I should have done this originally. Tried |
I have found steps to reproduce it on the latest nightly (2224a42 2018-09-17):
|
This is because we try to mark a query |
Rollup of 10 pull requests Successful merges: - #58110 (libpanic_unwind => 2018) - #58167 (HirId-ify hir::BodyId) - #58202 (Ignore future deprecations in #[deprecated]) - #58272 (Cut down on number formating code size) - #58276 (Improve the error messages for missing stability attributes) - #58354 (Fix ICE and invalid filenames in MIR printing code) - #58381 (Only suggest imports if not imported.) - #58386 (Fix #54242) - #58400 (Fix rustc_driver swallowing errors when compilation is stopped) - #58420 (target/uefi: clarify documentation) Failed merges: r? @ghost
Code
rustc --version --verbose
rustc 1.30.0-nightly (f2302da 2018-09-12)
binary: rustc
commit-hash: f2302da
commit-date: 2018-09-12
host: x86_64-unknown-linux-gnu
release: 1.30.0-nightly
LLVM version: 8.0
Stack trace
The text was updated successfully, but these errors were encountered: