thread 'rustc' panicked at /rustc/f8a913b1381e90379c7ca63ac2b88b9518936628/compiler/rustc_hir/src/def.rs:683:45:
attempted .def_id() on invalid res: Err
stack backtrace:
0: _rust_begin_unwind
1: core::panicking::panic_fmt
2: <dyn rustc_hir_analysis::hir_ty_lowering::HirTyLowerer>::check_for_required_assoc_tys
3: <dyn rustc_hir_analysis::hir_ty_lowering::HirTyLowerer>::lower_trait_object_ty
4: <dyn rustc_hir_analysis::hir_ty_lowering::HirTyLowerer>::lower_ty
5: rustc_hir_analysis::collect::type_of::type_of
[... omitted 1 frame ...]
6: rustc_hir_analysis::collect::lower_item
7: <rustc_hir_analysis::collect::CollectItemTypesVisitor as rustc_hir::intravisit::Visitor>::visit_item
8: rustc_hir_analysis::check::wfcheck::check_item
9: rustc_hir_analysis::check::wfcheck::check_well_formed
[... omitted 1 frame ...]
10: <rustc_middle::hir::ModuleItems>::par_opaques::<rustc_hir_analysis::check::wfcheck::check_mod_type_wf::{closure#4}>::{closure#0}
11: rustc_hir_analysis::check::wfcheck::check_mod_type_wf
[... omitted 1 frame ...]
12: rustc_hir_analysis::check_crate
13: rustc_interface::passes::run_required_analyses
14: rustc_interface::passes::analysis
[... omitted 1 frame ...]
15: rustc_interface::passes::create_and_enter_global_ctxt::<core::option::Option<rustc_interface::queries::Linker>, rustc_driver_impl::run_compiler::{closure#0}::{closure#2}>
16: rustc_interface::interface::run_compiler::<(), rustc_driver_impl::run_compiler::{closure#0}>::{closure#1}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
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 make sure that you have updated to the latest nightly
note: please attach the file at `/Volumes/T7/workspace/250224 scratch/codes/rustc-ice-2025-02-24T05_09_01-67498.txt` to your bug report
query stack during panic:
#0 [type_of] expanding type alias `A2`
#1 [check_well_formed] checking that `A2` is well-formed
#2 [check_mod_type_wf] checking that types are well-formed in top-level module
#3 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 3 previous errors
Some errors have detailed explanations: E0405, E0412, E0658.
For more information about an error, try `rustc --explain E0405`.
Code
Original Code (Fuzzing)
Meta
rustc --version --verbose:Error output
Backtrace
Notes
compiler/rustc_hir/src/def.rs Line-683rust/compiler/rustc_hir/src/def.rs
Lines 677 to 684 in f8a913b