Closed
Description
This code:
fn main() {
let foo = "1\n2".lines().map(|_| [1]);
let _ = foo.filter(|_| true);
}
Compiling it with rustc -Z mir-opt-level=2 test.rs
gives:
error: internal compiler error: error during interning should later cause validation failure
--> test.rs:3:13
|
3 | let _ = foo.filter(|_| true);
| ^^^
error: internal compiler error: error during interning should later cause validation failure
--> ...\lib/rustlib/src/rust\src\libcore\iter\traits\iterator.rs:730:21
|
730 | Filter::new(self, predicate)
| ^^^^
error: internal compiler error: error during interning should later cause validation failure
--> ...\lib/rustlib/src/rust\src\libcore\iter\adapters\mod.rs:912:18
|
912 | Filter { iter, predicate }
| ^^^^
thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', src\librustc_errors\lib.rs:366:17
stack backtrace:
...
Using:
rustc 1.45.0-nightly (3a7dfda40 2020-05-19)
binary: rustc
commit-hash: 3a7dfda40a3e798bf086bd58cc7e5e09deb808b5
commit-date: 2020-05-19
host: x86_64-pc-windows-gnu
release: 1.45.0-nightly
LLVM version: 9.0