Skip to content
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: expected exactly one crate #114920

Open
matthiaskrgr opened this issue Aug 17, 2023 · 3 comments
Open

ICE: expected exactly one crate #114920

matthiaskrgr opened this issue Aug 17, 2023 · 3 comments
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-medium Medium priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another. S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

matthiaskrgr commented Aug 17, 2023

Code

#![core::prelude::v1::test]

Meta

rustc --version --verbose:

rustc 1.73.0-nightly (0bdb00d55 2023-08-15)
binary: rustc
commit-hash: 0bdb00d55aa7d6aebe5a01bc6d3c5bf474a853ab
commit-date: 2023-08-15
host: x86_64-unknown-linux-gnu
release: 1.73.0-nightly
LLVM version: 17.0.0

Error output

error[E0658]: inner macro attributes are unstable
 --> 3FE4FE381370D3FE64AB5BA2621063FA00B3CE0B50A85AD17479D849AF1FCEF4.rs:1:4
  |
1 | #![core::prelude::v1::test]
  |    ^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #54726 <https://github.com/rust-lang/rust/issues/54726> for more information
  = help: add `#![feature(custom_inner_attributes)]` to the crate attributes to enable
Backtrace

thread 'rustc' panicked at compiler/rustc_expand/src/expand.rs:314:49:
expected exactly one crate
stack backtrace:
   0:     0x7fa6f77634dc - std::backtrace_rs::backtrace::libunwind::trace::h1a52aadab1e423ed
                               at /rustc/0bdb00d55aa7d6aebe5a01bc6d3c5bf474a853ab/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7fa6f77634dc - std::backtrace_rs::backtrace::trace_unsynchronized::h6ba22d133698223c
                               at /rustc/0bdb00d55aa7d6aebe5a01bc6d3c5bf474a853ab/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fa6f77634dc - std::sys_common::backtrace::_print_fmt::h109a934708356281
                               at /rustc/0bdb00d55aa7d6aebe5a01bc6d3c5bf474a853ab/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x7fa6f77634dc - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h616cb33c77b3507c
                               at /rustc/0bdb00d55aa7d6aebe5a01bc6d3c5bf474a853ab/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7fa6f77c962c - core::fmt::rt::Argument::fmt::hc5b672822529f326
                               at /rustc/0bdb00d55aa7d6aebe5a01bc6d3c5bf474a853ab/library/core/src/fmt/rt.rs:138:9
   5:     0x7fa6f77c962c - core::fmt::write::h65d66d3303e2b93b
                               at /rustc/0bdb00d55aa7d6aebe5a01bc6d3c5bf474a853ab/library/core/src/fmt/mod.rs:1094:21
   6:     0x7fa6f7755f6e - std::io::Write::write_fmt::h6c1f4b97f011d41f
                               at /rustc/0bdb00d55aa7d6aebe5a01bc6d3c5bf474a853ab/library/std/src/io/mod.rs:1714:15
   7:     0x7fa6f77632c4 - std::sys_common::backtrace::_print::h8e31077e74457cbb
                               at /rustc/0bdb00d55aa7d6aebe5a01bc6d3c5bf474a853ab/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7fa6f77632c4 - std::sys_common::backtrace::print::hb32da5910a86799a
                               at /rustc/0bdb00d55aa7d6aebe5a01bc6d3c5bf474a853ab/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7fa6f77663ba - std::panicking::panic_hook_with_disk_dump::{{closure}}::h4239609dadb6dd4b
                               at /rustc/0bdb00d55aa7d6aebe5a01bc6d3c5bf474a853ab/library/std/src/panicking.rs:278:22
  10:     0x7fa6f77660a7 - std::panicking::panic_hook_with_disk_dump::he7a9f97382268d96
                               at /rustc/0bdb00d55aa7d6aebe5a01bc6d3c5bf474a853ab/library/std/src/panicking.rs:312:9
  11:     0x7fa6fa96bf59 - rustc_driver_impl[65938c695a923997]::install_ice_hook::{closure#0}
  12:     0x7fa6f7766c60 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hf0c2c27361744f38
                               at /rustc/0bdb00d55aa7d6aebe5a01bc6d3c5bf474a853ab/library/alloc/src/boxed.rs:2021:9
  13:     0x7fa6f7766c60 - std::panicking::rust_panic_with_hook::hb07817b642426395
                               at /rustc/0bdb00d55aa7d6aebe5a01bc6d3c5bf474a853ab/library/std/src/panicking.rs:733:13
  14:     0x7fa6f77669e7 - std::panicking::begin_panic_handler::{{closure}}::h488a977f6d0b9662
                               at /rustc/0bdb00d55aa7d6aebe5a01bc6d3c5bf474a853ab/library/std/src/panicking.rs:621:13
  15:     0x7fa6f7763a06 - std::sys_common::backtrace::__rust_end_short_backtrace::h795eed542b7fd71a
                               at /rustc/0bdb00d55aa7d6aebe5a01bc6d3c5bf474a853ab/library/std/src/sys_common/backtrace.rs:170:18
  16:     0x7fa6f7766732 - rust_begin_unwind
                               at /rustc/0bdb00d55aa7d6aebe5a01bc6d3c5bf474a853ab/library/std/src/panicking.rs:617:5
  17:     0x7fa6f77c5a33 - core::panicking::panic_fmt::h6cea401c88668a39
                               at /rustc/0bdb00d55aa7d6aebe5a01bc6d3c5bf474a853ab/library/core/src/panicking.rs:67:14
  18:     0x7fa6f77c578a - core::panicking::panic_display::h6d1f308294ef9349
                               at /rustc/0bdb00d55aa7d6aebe5a01bc6d3c5bf474a853ab/library/core/src/panicking.rs:150:5
  19:     0x7fa6f77c578a - core::panicking::panic_str::h149afc02926435d9
                               at /rustc/0bdb00d55aa7d6aebe5a01bc6d3c5bf474a853ab/library/core/src/panicking.rs:134:5
  20:     0x7fa6f77c578a - core::option::expect_failed::hb346f79aa4c2fdad
                               at /rustc/0bdb00d55aa7d6aebe5a01bc6d3c5bf474a853ab/library/core/src/option.rs:1988:5
  21:     0x7fa6f9464f45 - <rustc_expand[a0c8bf28632e4702]::expand::AstFragmentKind>::expect_from_annotatables::<alloc[6066a680f2915695]::vec::Vec<rustc_expand[a0c8bf28632e4702]::base::Annotatable>>
  22:     0x7fa6f9449133 - <rustc_expand[a0c8bf28632e4702]::expand::MacroExpander>::fully_expand_fragment
  23:     0x7fa6f9aadc07 - <rustc_expand[a0c8bf28632e4702]::expand::MacroExpander>::expand_crate
  24:     0x7fa6f9aaceed - <rustc_session[584b13b7c15f5880]::session::Session>::time::<rustc_ast[7e47edba6e8f4f49]::ast::Crate, rustc_interface[9c67ccc1e80e5966]::passes::configure_and_expand::{closure#1}>
  25:     0x7fa6f9aa2851 - rustc_interface[9c67ccc1e80e5966]::passes::resolver_for_lowering
  26:     0x7fa6f9e7e3aa - rustc_query_impl[e7344d331a0cd74e]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[e7344d331a0cd74e]::query_impl::resolver_for_lowering::dynamic_query::{closure#2}::{closure#0}, rustc_middle[e44605746681820e]::query::erase::Erased<[u8; 8usize]>>
  27:     0x7fa6f9e7e399 - <rustc_query_impl[e7344d331a0cd74e]::query_impl::resolver_for_lowering::dynamic_query::{closure#2} as core[ac9b6779de401ae6]::ops::function::FnOnce<(rustc_middle[e44605746681820e]::ty::context::TyCtxt, ())>>::call_once
  28:     0x7fa6f9def3fc - rustc_query_system[f713a07e914ef80b]::query::plumbing::try_execute_query::<rustc_query_impl[e7344d331a0cd74e]::DynamicConfig<rustc_query_system[f713a07e914ef80b]::query::caches::SingleCache<rustc_middle[e44605746681820e]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[e7344d331a0cd74e]::plumbing::QueryCtxt, false>
  29:     0x7fa6fa2c3955 - rustc_query_impl[e7344d331a0cd74e]::query_impl::resolver_for_lowering::get_query_non_incr::__rust_end_short_backtrace
  30:     0x7fa6f9c55825 - <rustc_middle[e44605746681820e]::ty::context::GlobalCtxt>::enter::<rustc_driver_impl[65938c695a923997]::run_compiler::{closure#1}::{closure#2}::{closure#4}, &rustc_data_structures[6b3501c1aa0d2423]::steal::Steal<(rustc_middle[e44605746681820e]::ty::ResolverAstLowering, alloc[6066a680f2915695]::rc::Rc<rustc_ast[7e47edba6e8f4f49]::ast::Crate>)>>
  31:     0x7fa6f9c54a44 - <rustc_interface[9c67ccc1e80e5966]::interface::Compiler>::enter::<rustc_driver_impl[65938c695a923997]::run_compiler::{closure#1}::{closure#2}, core[ac9b6779de401ae6]::result::Result<core[ac9b6779de401ae6]::option::Option<rustc_interface[9c67ccc1e80e5966]::queries::Linker>, rustc_span[96ddbb965edded7c]::ErrorGuaranteed>>
  32:     0x7fa6f9c51e28 - std[2290b8cd92984895]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[9c67ccc1e80e5966]::util::run_in_thread_pool_with_globals<rustc_interface[9c67ccc1e80e5966]::interface::run_compiler<core[ac9b6779de401ae6]::result::Result<(), rustc_span[96ddbb965edded7c]::ErrorGuaranteed>, rustc_driver_impl[65938c695a923997]::run_compiler::{closure#1}>::{closure#0}, core[ac9b6779de401ae6]::result::Result<(), rustc_span[96ddbb965edded7c]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[ac9b6779de401ae6]::result::Result<(), rustc_span[96ddbb965edded7c]::ErrorGuaranteed>>
  33:     0x7fa6fa1d7ae5 - <<std[2290b8cd92984895]::thread::Builder>::spawn_unchecked_<rustc_interface[9c67ccc1e80e5966]::util::run_in_thread_pool_with_globals<rustc_interface[9c67ccc1e80e5966]::interface::run_compiler<core[ac9b6779de401ae6]::result::Result<(), rustc_span[96ddbb965edded7c]::ErrorGuaranteed>, rustc_driver_impl[65938c695a923997]::run_compiler::{closure#1}>::{closure#0}, core[ac9b6779de401ae6]::result::Result<(), rustc_span[96ddbb965edded7c]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[ac9b6779de401ae6]::result::Result<(), rustc_span[96ddbb965edded7c]::ErrorGuaranteed>>::{closure#1} as core[ac9b6779de401ae6]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  34:     0x7fa6f7771455 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h4cced11e3b719b0a
                               at /rustc/0bdb00d55aa7d6aebe5a01bc6d3c5bf474a853ab/library/alloc/src/boxed.rs:2007:9
  35:     0x7fa6f7771455 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hc891d0d7ae02d2bf
                               at /rustc/0bdb00d55aa7d6aebe5a01bc6d3c5bf474a853ab/library/alloc/src/boxed.rs:2007:9
  36:     0x7fa6f7771455 - std::sys::unix::thread::Thread::new::thread_start::h868c01f62b62c119
                               at /rustc/0bdb00d55aa7d6aebe5a01bc6d3c5bf474a853ab/library/std/src/sys/unix/thread.rs:108:17
  37:     0x7fa6f748c9eb - <unknown>
  38:     0x7fa6f7510ebc - <unknown>
  39:                0x0 - <unknown>

error: 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: please attach the file at `/tmp/GGGGG/rustc-ice-2023-08-17T04:05:14.583689148Z-3820690.txt` to your bug report

note: compiler flags: --crate-type lib

query stack during panic:
#0 [resolver_for_lowering] getting the resolver for lowering
end of query stack
error: aborting due to previous error

For more information about this error, try `rustc --explain E0658`.

@matthiaskrgr matthiaskrgr added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Aug 17, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 17, 2023
@matthiaskrgr
Copy link
Member Author

Regression in nightly-2021-12-02
commit[0] 2021-11-30: Auto merge of #91352 - nnethercote:RawVec-reserve_for_push, r=dtolnay
commit[1] 2021-12-01: Auto merge of #91406 - matthiaskrgr:rollup-a2whn8m, r=matthiaskrgr
commit[2] 2021-12-01: Auto merge of #91324 - eggyal:avoid-uneccesary-clone-of-annotatable, r=Aaron1011
commit[3] 2021-12-01: Auto merge of #91418 - matthiaskrgr:rollup-vn9f9w3, r=matthiaskrgr
commit[4] 2021-12-01: Auto merge of #91255 - b-naber:normalization-ice, r=jackh276
commit[5] 2021-12-01: Auto merge of #91275 - camelid:deny-test-warnings, r=jyn514
commit[6] 2021-12-01: Auto merge of #91433 - matthiaskrgr:rollup-118ql06, r=matthiaskrgr

@matthiaskrgr
Copy link
Member Author

#91313

@saethlin saethlin removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 20, 2023
@matthiaskrgr matthiaskrgr added the regression-from-stable-to-stable Performance or correctness regression from one stable version to another. label Aug 25, 2023
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Aug 25, 2023
@apiraino
Copy link
Contributor

WG-prioritization assigning priority (Zulip discussion).

(by the way thanks @matthiaskrgr for bisecting issues recently 🙂 )

@rustbot label -I-prioritize +P-medium

@rustbot rustbot added P-medium Medium priority and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Aug 29, 2023
@obeis obeis removed their assignment Aug 30, 2023
@matthiaskrgr matthiaskrgr added the S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. label Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-medium Medium priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another. S-bug-has-test Status: This bug is tracked inside the repo by a `known-bug` test. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants