Since nightly-2019-11-17. Merges in the regression range:
``rust
thread 'rustc' panicked at 'no entry found for key', src/libcore/option.rs:1187:5
stack backtrace:
0: backtrace::backtrace::libunwind::trace
at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
1: backtrace::backtrace::trace_unsynchronized
at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
2: std::sys_common::backtrace::_print_fmt
at src/libstd/sys_common/backtrace.rs:84
3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
at src/libstd/sys_common/backtrace.rs:61
4: core::fmt::write
at src/libcore/fmt/mod.rs:1030
5: std::io::Write::write_fmt
at src/libstd/io/mod.rs:1412
6: std::sys_common::backtrace::_print
at src/libstd/sys_common/backtrace.rs:65
7: std::sys_common::backtrace::print
at src/libstd/sys_common/backtrace.rs:50
8: std::panicking::default_hook::{{closure}}
at src/libstd/panicking.rs:188
9: std::panicking::default_hook
at src/libstd/panicking.rs:205
10: rustc_driver::report_ice
11: <alloc::boxed::Box<F> as core::ops::function::Fn<A>>::call
at /rustc/5c5b8afd80e6fa1d24632153cb2257c686041d41/src/liballoc/boxed.rs:956
12: proc_macro::bridge::client::<impl proc_macro::bridge::Bridge>::enter::{{closure}}::{{closure}}
at /rustc/5c5b8afd80e6fa1d24632153cb2257c686041d41/src/libproc_macro/bridge/client.rs:305
13: std::panicking::rust_panic_with_hook
at src/libstd/panicking.rs:468
14: std::panicking::continue_panic_fmt
at src/libstd/panicking.rs:373
15: rust_begin_unwind
at src/libstd/panicking.rs:302
16: core::panicking::panic_fmt
at src/libcore/panicking.rs:82
17: core::option::expect_failed
at src/libcore/option.rs:1187
18: rustc::hir::map::def_collector::DefCollector::collect_field
19: syntax_expand::expand::AstFragment::visit_with
20: rustc_resolve::macros::<impl syntax_expand::base::Resolver for rustc_resolve::Resolver>::visit_ast_fragment_with_placeholders
21: syntax_expand::expand::MacroExpander::collect_invocations
22: syntax_expand::expand::MacroExpander::fully_expand_fragment
23: syntax_expand::expand::MacroExpander::expand_crate
24: rustc_interface::passes::configure_and_expand_inner::{{closure}}
25: rustc_interface::passes::configure_and_expand_inner
26: rustc_interface::passes::configure_and_expand::{{closure}}
27: rustc_data_structures::box_region::PinnedGenerator<I,A,R>::new
28: rustc_interface::passes::configure_and_expand
29: rustc_interface::queries::Query<T>::compute
30: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::expansion
31: rustc_interface::interface::run_compiler_in_existing_thread_pool
32: std::thread::local::LocalKey<T>::with
33: scoped_tls::ScopedKey<T>::set
34: syntax::with_globals
note: Some details are omitted, run withRUST_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/blob/master/CONTRIBUTING.md#bug-reports
note: rustc 1.41.0-nightly (5c5b8afd8 2019-11-16) running on x86_64-unknown-linux-gnu
note: compiler flags: -C debuginfo=2 -C link-args=-fuse-ld=gold --crate-type rlib
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
end of query stack
This is not intermittent. I鈥檝e reproduced it locally both in debug and release mode.
Commit bisection points to 5c5b8afd80e6fa1d24632153cb2257c686041d41, cc @petrochenkov
Serde's test suite also hits this ICE. https://travis-ci.org/serde-rs/serde/jobs/613363213
Minimization would be appreciated and may help to get a fix merged sooner.
Otherwise I won't be able to work on this until the weekend.
Minified example (From the failing serde test):
enum Foo {
Bar(
#[foo]
#[foo]
X
)
}
EDIT: Further minified:
struct Bar(
#[foo]
#[foo]
X
);
$ RUST_BACKTRACE=1 rustc test.rs
thread 'rustc' panicked at 'no entry found for key', src/libcore/option.rs:1187:5
stack backtrace:
0: backtrace::backtrace::libunwind::trace
at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
1: backtrace::backtrace::trace_unsynchronized
at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
2: std::sys_common::backtrace::_print_fmt
at src/libstd/sys_common/backtrace.rs:84
3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
at src/libstd/sys_common/backtrace.rs:61
4: core::fmt::write
at src/libcore/fmt/mod.rs:1030
5: std::io::Write::write_fmt
at src/libstd/io/mod.rs:1412
6: std::sys_common::backtrace::_print
at src/libstd/sys_common/backtrace.rs:65
7: std::sys_common::backtrace::print
at src/libstd/sys_common/backtrace.rs:50
8: std::panicking::default_hook::{{closure}}
at src/libstd/panicking.rs:188
9: std::panicking::default_hook
at src/libstd/panicking.rs:205
10: rustc_driver::report_ice
11: std::panicking::rust_panic_with_hook
at src/libstd/panicking.rs:468
12: std::panicking::continue_panic_fmt
at src/libstd/panicking.rs:373
13: rust_begin_unwind
at src/libstd/panicking.rs:302
14: core::panicking::panic_fmt
at src/libcore/panicking.rs:82
15: core::option::expect_failed
at src/libcore/option.rs:1187
16: rustc::hir::map::def_collector::DefCollector::collect_field
17: syntax_expand::expand::AstFragment::visit_with
18: rustc_resolve::macros::<impl syntax_expand::base::Resolver for rustc_resolve::Resolver>::visit_ast_fragment_with_placeholders
19: syntax_expand::expand::MacroExpander::collect_invocations
20: syntax_expand::expand::MacroExpander::fully_expand_fragment
21: syntax_expand::expand::MacroExpander::expand_crate
22: rustc_interface::passes::configure_and_expand_inner::{{closure}}
23: rustc_interface::passes::configure_and_expand_inner
24: rustc_interface::passes::configure_and_expand::{{closure}}
25: rustc_data_structures::box_region::PinnedGenerator<I,A,R>::new
26: rustc_interface::passes::configure_and_expand
27: rustc_interface::queries::Query<T>::compute
28: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::expansion
29: rustc_interface::interface::run_compiler_in_existing_thread_pool
30: std::thread::local::LocalKey<T>::with
31: scoped_tls::ScopedKey<T>::set
32: syntax::with_globals
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/blob/master/CONTRIBUTING.md#bug-reports
note: rustc 1.41.0-nightly (3e525e3f6 2019-11-18) running on x86_64-unknown-linux-gnu
query stack during panic:
end of query stack
Same ICE on stable:
struct S (
#[rustfmt::skip]
#[rustfmt::skip]
u8
);
fn main() {}
The true source of the ICE is https://github.com/rust-lang/rust/pull/63468.
https://github.com/rust-lang/rust/pull/64694 only "unmasked" that ICE for derive helper attributes because they now go through name resolution like other attributes.
triage: P-high. Removing nomination. Removing E-needs-mcve (I think @petrochenkov 's latest qualifies as such).
Most helpful comment
Minified example (From the failing serde test):
EDIT: Further minified: