Closed
Description
Code
The code is part of the full_moon package, I have filed an issue there to try and get a minimal example
Meta
This problem only happens on nightly version shown below
rustc --version --verbose
:
❯ rustc --version --verbose
rustc 1.56.0-nightly (29ef6cf16 2021-08-31)
binary: rustc
commit-hash: 29ef6cf1637aa8317f8911f93f14e18d404c1b0e
commit-date: 2021-08-31
host: x86_64-unknown-linux-gnu
release: 1.56.0-nightly
LLVM version: 13.0.0
Error output
Compiling full_moon v0.13.1
Compiling stylua v0.10.1
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:1976 ~ full_moon[7f67]::ast::parsers::{impl#225}::parse::{closure#0}), const_param_did: None }) (end of phase Optimization) at bb63[0]:
use of local _155, which has no storage here
--> /home/amedhi/.cargo/registry/src/github.com-1ecc6299db9ec823/full_moon-0.13.1/src/ast/parsers.rs:1858:4
|
1858 | }
| ^
...
1865 | / make_op_parser!(BinOp, ParseBinOp,
1866 | | {
1867 | | And,
1868 | | Caret,
... |
1882 | | }
1883 | | );
| |__- in this macro invocation
|
= note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36
= note: this error: internal compiler error originates in the macro `make_op_parser` (in Nightly builds, run with -Z macro-backtrace for more info)
error: internal compiler error: broken MIR in Item(WithOptConstParam { did: DefId(0:1990 ~ full_moon[7f67]::ast::parsers::{impl#230}::parse::{closure#0}), const_param_did: None }) (end of phase Optimization) at bb15[0]:
use of local _35, which has no storage here
--> /home/amedhi/.cargo/registry/src/github.com-1ecc6299db9ec823/full_moon-0.13.1/src/ast/parsers.rs:1858:4
|
1858 | }
| ^
...
1885 | / make_op_parser!(UnOp, ParseUnOp,
1886 | | {
1887 | | Minus,
1888 | | Not,
1889 | | Hash,
1890 | | }
1891 | | );
| |__- in this macro invocation
|
= note: delayed at compiler/rustc_mir/src/transform/validate.rs:121:36
= note: this error: internal compiler error originates in the macro `make_op_parser` (in Nightly builds, run with -Z macro-backtrace for more info)
thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', compiler/rustc_errors/src/lib.rs:1166:13
stack backtrace:
0: rust_begin_unwind
at /rustc/29ef6cf1637aa8317f8911f93f14e18d404c1b0e/library/std/src/panicking.rs:517:5
1: std::panicking::begin_panic_fmt
at /rustc/29ef6cf1637aa8317f8911f93f14e18d404c1b0e/library/std/src/panicking.rs:460:5
2: rustc_errors::HandlerInner::flush_delayed
3: <rustc_errors::HandlerInner as core::ops::drop::Drop>::drop
4: core::ptr::drop_in_place<rustc_session::parse::ParseSess>
5: <alloc::rc::Rc<T> as core::ops::drop::Drop>::drop
6: core::ptr::drop_in_place<rustc_interface::interface::Compiler>
7: rustc_span::with_source_map
8: scoped_tls::ScopedKey<T>::set
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: rustc 1.56.0-nightly (29ef6cf16 2021-08-31) running on x86_64-unknown-linux-gnu
note: compiler flags: -C opt-level=3 -C panic=abort -C linker-plugin-lto -C link-arg=-fuse-ld=lld -C target-cpu=native --crate-type lib
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
end of query stack
error: could not compile `full_moon`
warning: build failed, waiting for other jobs to finish...
error: failed to compile `stylua v0.10.1`, intermediate artifacts can be found at `/tmp/cargo-installvxqZx9`
Backtrace
thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued', compiler/rustc_errors/src/lib.rs:1166:13
stack backtrace:
0: rust_begin_unwind
at /rustc/29ef6cf1637aa8317f8911f93f14e18d404c1b0e/library/std/src/panicking.rs:517:5
1: std::panicking::begin_panic_fmt
at /rustc/29ef6cf1637aa8317f8911f93f14e18d404c1b0e/library/std/src/panicking.rs:460:5
2: rustc_errors::HandlerInner::flush_delayed
3: <rustc_errors::HandlerInner as core::ops::drop::Drop>::drop
4: core::ptr::drop_in_place<rustc_session::parse::ParseSess>
5: <alloc::rc::Rc<T> as core::ops::drop::Drop>::drop
6: core::ptr::drop_in_place<rustc_interface::interface::Compiler>
7: rustc_span::with_source_map
8: scoped_tls::ScopedKey<T>::set