Repository: rust
Issue: ICE: `expected exactly one crate`
Labels: I-ICE,P-medium,T-compiler,regression-from-stable-to-stable,C-bug,S-bug-has-test

<!--
Thank you for finding an Internal Compiler Error! 🧊  If possible, try to provide
a minimal verifiable example. You can read "Rust Bug Minimization Patterns" for
how to create smaller examples.
http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/
-->

### Code

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


### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`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
```

<!--
Include a backtrace in the code block by setting `RUST_BACKTRACE=1` in your
environment. E.g. `RUST_BACKTRACE=1 cargo build`.
-->
<details><summary><strong>Backtrace</strong></summary>
<p>

```
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`.
```

</p>
</details>


<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"obeis"}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->