-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ICE "broken MIR ... Field projection specified type ... but actual type is ..." comparing type with type as trait #105044
Comments
I found a workaround, but I still couldn't find a minimal example. |
I think I encountered the same ICE bug, and still can't find a minimal reproduce example. Error output
|
Perhaps #105009 shares the same problem? Same regressed nightly build, same ice error ("delay_span_bug" + broken MIR). |
* Remove an unused async track_caller which will soon become a warning * Explicitly drop unused futures * Work around a compiler panic (ICE) with flat_map() rust-lang/rust#105044 * Remove a redundant into_iter() * allow(clippy::needless_collect)
|
Do you have a minimal example? I had trouble getting one from Zebra, because the error happened when calling a large chain of iterators. (I've added the specific |
closing in favor of #105009 |
* Remove an unused async track_caller which will soon become a warning * Explicitly drop unused futures * Work around a compiler panic (ICE) with flat_map() rust-lang/rust#105044 * Remove a redundant into_iter() * allow(clippy::needless_collect)
There seems to be a bug in the way that Rust compiles
Iterator::flat_map()
, in release mode, with complex iterators.It also triggers on other "type" vs "type as trait" comparisons in the compiler, for example unsized-vec fails with:
Code
Related crate code:
Failing code:
Workaround:
Meta
Fails from nightly nightly-2022-11-20 onwards, in commit 2f8d804.
rustc --version --verbose
:I used these commands to bisect the nightly Rust version:
Zebra needs some build dependencies:
https://github.com/ZcashFoundation/zebra#build-instructions
Regression log:
searched nightlies: from nightly-2022-11-07 to nightly-2022-11-29
regressed nightly: nightly-2022-11-20
searched commit range: b833ad5...c5d82ed
regressed commit: 2f8d804
bisected with cargo-bisect-rustc v0.6.4
Host triple: x86_64-unknown-linux-gnu
Reproduce with:
Analysis
This might be caused by
-C linker-plugin-lto
or release builds, but I couldn't find an exact set of flags or a minimal example to reproduce it.cargo build
does not fail, either from the individual crate or workspace directory. Butcargo build --release
andcargo install --git https://github.com/ZcashFoundation/zebra.git zebrad
fail.I tried commenting out my whole
.cargo/config.toml
, and it didn't make a difference.Error output
Backtrace
The text was updated successfully, but these errors were encountered: