error: internal compiler error: /rustc/0bf471f339837af930ec90ef5e1e9cb232e99f29/compiler/rustc_middle/src/ty/consts.rs:437:32: expected usize, got N/#0: usize
thread 'rustc' panicked at /rustc/0bf471f339837af930ec90ef5e1e9cb232e99f29/compiler/rustc_middle/src/ty/consts.rs:437:32:
Box<dyn Any>
stack backtrace:
0: std::panicking::begin_panic::<rustc_errors::ExplicitBug>
1: <rustc_errors::diagnostic::BugAbort as rustc_errors::diagnostic::EmissionGuarantee>::emit_producing_guarantee
2: rustc_middle::util::bug::opt_span_bug_fmt::<rustc_span::span_encoding::Span>::{closure#0}
3: rustc_middle::ty::context::tls::with_opt::<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, !>::{closure#0}
4: rustc_middle::ty::context::tls::with_context_opt::<rustc_middle::ty::context::tls::with_opt<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
5: rustc_middle::util::bug::bug_fmt
6: rustc_hir_analysis::check::ty_kind_suggestion
7: <rustc_hir_typeck::coercion::CoerceMany<&rustc_hir::hir::Expr>>::coerce_inner::<<rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_break::{closure#2}>
8: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
9: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
10: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_stmt
11: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_block_with_expected
12: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_kind
13: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
14: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_block_with_expected
15: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_expr_with_expectation_and_args
16: <rustc_hir_typeck::fn_ctxt::FnCtxt>::check_return_expr
17: rustc_hir_typeck::check::check_fn
18: rustc_hir_typeck::typeck
[... omitted 2 frames ...]
19: <rustc_middle::hir::map::Map>::par_body_owners::<rustc_hir_analysis::check_crate::{closure#4}>::{closure#0}
20: <rustc_data_structures::sync::parallel::ParallelGuard>::run::<(), rustc_data_structures::sync::parallel::enabled::par_for_each_in<&rustc_span::def_id::LocalDefId, &[rustc_span::def_id::LocalDefId], <rustc_middle::hir::map::Map>::par_body_owners<rustc_hir_analysis::check_crate::{closure#4}>::{closure#0}>::{closure#0}::{closure#0}::{closure#0}>
21: rustc_hir_analysis::check_crate
22: rustc_interface::passes::analysis
[... omitted 2 frames ...]
23: <rustc_middle::ty::context::GlobalCtxt>::enter::<rustc_driver_impl::run_compiler::{closure#0}::{closure#1}::{closure#3}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
24: <rustc_interface::interface::Compiler>::enter::<rustc_driver_impl::run_compiler::{closure#0}::{closure#1}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_span::ErrorGuaranteed>>
25: rustc_span::set_source_map::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#0}::{closure#0}>
26: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>
27: rustc_span::create_session_globals_then::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_interface::util::run_in_thread_with_globals<rustc_interface::util::run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#0}>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}, core::result::Result<(), rustc_span::ErrorGuaranteed>>::{closure#0}::{closure#0}::{closure#0}>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
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 `/Users/jisukbyun/workspace/placeholder/0413_rust/rustc-ice-2024-04-14T03_01_42-57049.txt` to your bug report
query stack during panic:
#0 [typeck] type-checking `as_chunks`
#1 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 1 previous error
Code
(reduced)
Original Code
Meta
rustc --version --verbose:Command
rustcError output
Backtrace
Note
ICE-location:
compiler/rustc_middle/src/ty/consts.rs, Line-437, fn eval_target_usizerust/compiler/rustc_middle/src/ty/consts.rs
Lines 433 to 438 in 0bf471f
Closed Issue ICE:
expected usize, got UnevaluatedConst#116186 has identical ICE-location,compiler/rustc_middle/src/ty/consts.rs, Line-375, fn eval_target_usize