-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Closed
Labels
A-control-flow-integrityArea: Control Flow Integrity (CFI) security mitigationArea: Control Flow Integrity (CFI) security mitigationC-bugCategory: This is a bug.Category: This is a bug.F-min_generic_const_args`#![feature(min_generic_const_args)]``#![feature(min_generic_const_args)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.requires-debug-assertionsThis issue requires a build of rustc or tooling with debug-assertions in some wayThis issue requires a build of rustc or tooling with debug-assertions in some way
Description
auto-reduced (treereduce-rust):
//@compile-flags: -Zsanitizer=cfi -Ccodegen-units=1 -Clto -Cunsafe-allow-abi-mismatch=sanitizer
//
#![feature(min_generic_const_args)]
trait Trait {
#[type_const]
const N: usize;
fn process(&self, _: [u8; Self::N]) -> [u8; Self::N];
}
impl Trait for u8 {
#[type_const]
const N: usize = 2;
fn process(&self, [x, y]: [u8; Self::N]) -> [u8; Self::N] {
[self * x, self + y]
}
}
impl<const N: usize> Trait for [u8; N] {
#[type_const]
const N: usize = N;
fn process(&self, other: [u8; Self::N]) -> [u8; Self::N] {
let mut result = [0; _];
result
}
}
fn main() {
let ops: [Box<dyn Trait<N = 2>>; _] = [Box::new(3), Box::new([1, 1])];
}original code
original:
// While mentioning `Self` in the method signature of dyn compatible traits is generally forbidden
// due to type erasure, we can make an exception for const projections from `Self` where the trait
// is the principal trait or a supertrait thereof. That's sound because we force users to specify
// all associated consts in the trait object type, so the projections are all normalizable.
//
// Check that we can define & use dyn compatible traits that reference `Self` const projections.
// This is a run-pass test to ensure that codegen can actually deal with such method instances
// (e.g., const projections normalize flawlessly to something concrete, symbols get mangled
// properly, the vtable is fine) and simply to ensure that the generated code "received" the
// correct values from the type assoc consts).
//@ run-pass
#![feature(min_generic_const_args)]
#![expect(incomplete_features)]
trait Trait {
#[type_const]
const N: usize;
fn process(&self, _: [u8; Self::N]) -> [u8; Self::N];
}
impl Trait for u8 {
#[type_const]
const N: usize = 2;
fn process(&self, [x, y]: [u8; Self::N]) -> [u8; Self::N] {
[self * x, self + y]
}
}
impl<const N: usize> Trait for [u8; N] {
#[type_const]
const N: usize = N;
fn process(&self, other: [u8; Self::N]) -> [u8; Self::N] {
let mut result = [0; _];
for i in 0..Self::N {
result[i] = self[i] + other[i];
}
result
}
}
fn main() {
let ops: [Box<dyn Trait<N = 2>>; _] = [Box::new(3), Box::new([1, 1])];
let mut data = [16, 32];
for op in ops {
data = op.process(data);
}
assert_eq!(data, [49, 36]);
}Version information
rustc 1.95.0-nightly (a293cc4af 2026-01-30)
binary: rustc
commit-hash: a293cc4af8b26701c42738381c0c6f9d2ba881e0
commit-date: 2026-01-30
host: x86_64-unknown-linux-gnu
release: 1.95.0-nightly
LLVM version: 22.1.0
Possibly related line of code:
rust/compiler/rustc_middle/src/ty/sty.rs
Lines 728 to 740 in a293cc4
| .filter(|item| !item.is_impl_trait_in_trait()) | |
| .filter(|item| !tcx.generics_require_sized_self(item.def_id)) | |
| .count() | |
| }) | |
| }) | |
| .sum(); | |
| assert_eq!( | |
| projection_count, expected_count, | |
| "expected {obj:?} to have {expected_count} projections, \ | |
| but it has {projection_count}" | |
| ); | |
| } | |
| Ty::new(tcx, Dynamic(obj, reg)) |
Command:
/home/matthias/.rustup/toolchains/alt-master/bin/rustc -Zsanitizer=cfi -Ccodegen-units=1 -Clto -Cunsafe-allow-abi-mismatch=sanitizer
Program output
warning: the feature `min_generic_const_args` is incomplete and may not be safe to use and/or cause compiler crashes
--> /tmp/icemaker_global_tempdir.oBUMwxXUuR33/rustc_testrunner_tmpdir_reporting.4GA7v8dzme4V/mvce.rs:3:12
|
3 | #![feature(min_generic_const_args)]
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #132980 <https://github.com/rust-lang/rust/issues/132980> for more information
= note: `#[warn(incomplete_features)]` on by default
warning: variable does not need to be mutable
--> /tmp/icemaker_global_tempdir.oBUMwxXUuR33/rustc_testrunner_tmpdir_reporting.4GA7v8dzme4V/mvce.rs:26:13
|
26 | let mut result = [0; _];
| ----^^^^^^
| |
| help: remove this `mut`
|
= note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default
warning: unused variable: `other`
--> /tmp/icemaker_global_tempdir.oBUMwxXUuR33/rustc_testrunner_tmpdir_reporting.4GA7v8dzme4V/mvce.rs:25:23
|
25 | fn process(&self, other: [u8; Self::N]) -> [u8; Self::N] {
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_other`
|
= note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default
warning: unused variable: `ops`
--> /tmp/icemaker_global_tempdir.oBUMwxXUuR33/rustc_testrunner_tmpdir_reporting.4GA7v8dzme4V/mvce.rs:33:9
|
33 | let ops: [Box<dyn Trait<N = 2>>; _] = [Box::new(3), Box::new([1, 1])];
| ^^^ help: if this is intentional, prefix it with an underscore: `_ops`
warning: method `process` is never used
--> /tmp/icemaker_global_tempdir.oBUMwxXUuR33/rustc_testrunner_tmpdir_reporting.4GA7v8dzme4V/mvce.rs:9:8
|
5 | trait Trait {
| ----- method in this trait
...
9 | fn process(&self, _: [u8; Self::N]) -> [u8; Self::N];
| ^^^^^^^
|
= note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default
thread 'rustc' (3912171) panicked at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_middle/src/ty/sty.rs:734:13:
assertion `left == right` failed: expected [Binder { value: Trait(Trait), bound_vars: [] }] to have 1 projections, but it has 0
left: 0
right: 1
stack backtrace:
0: 0x7f2131f38ec0 - std[8936757b9337e6a3]::backtrace_rs::backtrace::libunwind::trace
at /rustc/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/std/src/../../backtrace/src/backtrace/libunwind.rs:117:9
1: 0x7f2131f38ec0 - std[8936757b9337e6a3]::backtrace_rs::backtrace::trace_unsynchronized::<std[8936757b9337e6a3]::sys::backtrace::_print_fmt::{closure#1}>
at /rustc/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/std/src/../../backtrace/src/backtrace/mod.rs:66:14
2: 0x7f2131f38ec0 - std[8936757b9337e6a3]::sys::backtrace::_print_fmt
at /rustc/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/std/src/sys/backtrace.rs:74:9
3: 0x7f2131f38ec0 - <<std[8936757b9337e6a3]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[916326d1bf71be52]::fmt::Display>::fmt
at /rustc/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/std/src/sys/backtrace.rs:44:26
4: 0x7f212d5e346e - <core[916326d1bf71be52]::fmt::rt::Argument>::fmt
at /rustc/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/core/src/fmt/rt.rs:152:76
5: 0x7f212d5e346e - core[916326d1bf71be52]::fmt::write
6: 0x7f2131f5133c - std[8936757b9337e6a3]::io::default_write_fmt::<std[8936757b9337e6a3]::sys::stdio::unix::Stderr>
at /rustc/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/std/src/io/mod.rs:639:11
7: 0x7f2131f5133c - <std[8936757b9337e6a3]::sys::stdio::unix::Stderr as std[8936757b9337e6a3]::io::Write>::write_fmt
at /rustc/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/std/src/io/mod.rs:1994:13
8: 0x7f2131efd9a6 - <std[8936757b9337e6a3]::sys::backtrace::BacktraceLock>::print
at /rustc/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/std/src/sys/backtrace.rs:47:9
9: 0x7f2131efd9a6 - std[8936757b9337e6a3]::panicking::default_hook::{closure#0}
at /rustc/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/std/src/panicking.rs:292:27
10: 0x7f2131f27b51 - std[8936757b9337e6a3]::panicking::default_hook
at /rustc/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/std/src/panicking.rs:319:9
11: 0x7f212e9cb1e8 - <alloc[c95acf19e9cf6501]::boxed::Box<dyn for<'a, 'b> core[916326d1bf71be52]::ops::function::Fn<(&'a std[8936757b9337e6a3]::panic::PanicHookInfo<'b>,), Output = ()> + core[916326d1bf71be52]::marker::Sync + core[916326d1bf71be52]::marker::Send> as core[916326d1bf71be52]::ops::function::Fn<(&std[8936757b9337e6a3]::panic::PanicHookInfo,)>>::call
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/alloc/src/boxed.rs:2220:9
12: 0x7f212e9cb1e8 - rustc_driver_impl[d4a49404c0ba38e5]::install_ice_hook::{closure#1}
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_driver_impl/src/lib.rs:1491:17
13: 0x7f212e9cb1e8 - <alloc[c95acf19e9cf6501]::boxed::Box<rustc_driver_impl[d4a49404c0ba38e5]::install_ice_hook::{closure#1}> as core[916326d1bf71be52]::ops::function::Fn<(&dyn for<'a, 'b> core[916326d1bf71be52]::ops::function::Fn<(&'a std[8936757b9337e6a3]::panic::PanicHookInfo<'b>,), Output = ()> + core[916326d1bf71be52]::marker::Sync + core[916326d1bf71be52]::marker::Send, &std[8936757b9337e6a3]::panic::PanicHookInfo)>>::call
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/alloc/src/boxed.rs:2220:9
14: 0x7f212e9cb1e8 - std[8936757b9337e6a3]::panicking::update_hook::<alloc[c95acf19e9cf6501]::boxed::Box<rustc_driver_impl[d4a49404c0ba38e5]::install_ice_hook::{closure#1}>>::{closure#0}
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/std/src/panicking.rs:235:47
15: 0x7f2131f27eea - <alloc[c95acf19e9cf6501]::boxed::Box<dyn for<'a, 'b> core[916326d1bf71be52]::ops::function::Fn<(&'a std[8936757b9337e6a3]::panic::PanicHookInfo<'b>,), Output = ()> + core[916326d1bf71be52]::marker::Sync + core[916326d1bf71be52]::marker::Send> as core[916326d1bf71be52]::ops::function::Fn<(&std[8936757b9337e6a3]::panic::PanicHookInfo,)>>::call
at /rustc/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/alloc/src/boxed.rs:2220:9
16: 0x7f2131f27eea - std[8936757b9337e6a3]::panicking::panic_with_hook
at /rustc/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/std/src/panicking.rs:833:13
17: 0x7f2131efda68 - std[8936757b9337e6a3]::panicking::panic_handler::{closure#0}
at /rustc/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/std/src/panicking.rs:698:13
18: 0x7f2131ee9509 - std[8936757b9337e6a3]::sys::backtrace::__rust_end_short_backtrace::<std[8936757b9337e6a3]::panicking::panic_handler::{closure#0}, !>
at /rustc/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/std/src/sys/backtrace.rs:182:18
19: 0x7f2131eff9bd - __rustc[dff7bba7b93d99f5]::rust_begin_unwind
at /rustc/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/std/src/panicking.rs:689:5
20: 0x7f212d5e3e9c - core[916326d1bf71be52]::panicking::panic_fmt
at /rustc/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/core/src/panicking.rs:80:14
21: 0x7f212d5e3d83 - core[916326d1bf71be52]::panicking::assert_failed_inner
at /rustc/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/core/src/panicking.rs:434:23
22: 0x7f212d5d783d - core[916326d1bf71be52]::panicking::assert_failed::<usize, usize>
at /rustc/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/core/src/panicking.rs:394:5
23: 0x7f2131396c46 - <rustc_middle[7e36f9941c1715b2]::ty::Ty>::new_dynamic
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_middle/src/ty/sty.rs:734:13
24: 0x7f21313a27b2 - rustc_sanitizers[25165b297a487ac2]::cfi::typeid::itanium_cxx_abi::transform::trait_object_ty::{closure#0}
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/transform.rs:274:5
25: 0x7f21313a27b2 - rustc_sanitizers[25165b297a487ac2]::cfi::typeid::itanium_cxx_abi::transform::trait_object_ty
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/transform.rs:236:1
26: 0x7f21313a784f - rustc_sanitizers[25165b297a487ac2]::cfi::typeid::itanium_cxx_abi::transform::transform_instance
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/transform.rs:391:29
27: 0x7f213139abe1 - rustc_sanitizers[25165b297a487ac2]::cfi::typeid::itanium_cxx_abi::typeid_for_instance
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/mod.rs:119:20
28: 0x7f212e35a38e - rustc_sanitizers[25165b297a487ac2]::cfi::typeid::typeid_for_instance
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_sanitizers/src/cfi/typeid/mod.rs:54:5
29: 0x7f212e35a38e - <rustc_codegen_llvm[5ddb5eaaafc1495c]::context::GenericCx<rustc_codegen_llvm[5ddb5eaaafc1495c]::context::FullCx>>::declare_fn
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_codegen_llvm/src/declare.rs:175:34
30: 0x7f212e3ec26a - <rustc_codegen_llvm[5ddb5eaaafc1495c]::context::GenericCx<rustc_codegen_llvm[5ddb5eaaafc1495c]::context::FullCx> as rustc_codegen_ssa[3fe239894ef9293f]::traits::declare::PreDefineCodegenMethods>::predefine_fn
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_codegen_llvm/src/mono_item.rs:63:27
31: 0x7f212e3da777 - <rustc_middle[7e36f9941c1715b2]::mir::mono::MonoItem as rustc_codegen_ssa[3fe239894ef9293f]::mono_item::MonoItemExt>::predefine::<rustc_codegen_llvm[5ddb5eaaafc1495c]::builder::GenericBuilder<rustc_codegen_llvm[5ddb5eaaafc1495c]::context::FullCx>>
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_codegen_ssa/src/mono_item.rs:80:24
32: 0x7f212e3da777 - rustc_codegen_llvm[5ddb5eaaafc1495c]::base::compile_codegen_unit::module_codegen
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_codegen_llvm/src/base.rs:109:27
33: 0x7f212e3fc4dd - <rustc_query_system[b793d1d02f6a7dc4]::dep_graph::graph::DepGraph<rustc_middle[7e36f9941c1715b2]::dep_graph::DepsType>>::with_task::<rustc_middle[7e36f9941c1715b2]::ty::context::TyCtxt, rustc_span[f1cfcd62ed02da19]::symbol::Symbol, rustc_codegen_ssa[3fe239894ef9293f]::ModuleCodegen<rustc_codegen_llvm[5ddb5eaaafc1495c]::ModuleLlvm>>
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_query_system/src/dep_graph/graph.rs:273:22
34: 0x7f212e3fc4dd - rustc_codegen_llvm[5ddb5eaaafc1495c]::base::compile_codegen_unit
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_codegen_llvm/src/base.rs:65:37
35: 0x7f212e3fc4dd - <rustc_codegen_llvm[5ddb5eaaafc1495c]::LlvmCodegenBackend as rustc_codegen_ssa[3fe239894ef9293f]::traits::backend::ExtraBackendMethods>::compile_codegen_unit
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_codegen_llvm/src/lib.rs:125:9
36: 0x7f212e29b662 - rustc_codegen_ssa[3fe239894ef9293f]::base::codegen_crate::<rustc_codegen_llvm[5ddb5eaaafc1495c]::LlvmCodegenBackend>
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_codegen_ssa/src/base.rs:806:42
37: 0x7f212e4326ca - <rustc_codegen_llvm[5ddb5eaaafc1495c]::LlvmCodegenBackend as rustc_codegen_ssa[3fe239894ef9293f]::traits::backend::CodegenBackend>::codegen_crate
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_codegen_llvm/src/lib.rs:354:18
38: 0x7f212f8b8125 - rustc_interface[2ae116c6a4677e35]::passes::start_codegen::{closure#0}
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_interface/src/passes.rs:1264:29
39: 0x7f212f8b8125 - <rustc_data_structures[a569e71b4b18e7cd]::profiling::VerboseTimingGuard>::run::<alloc[c95acf19e9cf6501]::boxed::Box<dyn core[916326d1bf71be52]::any::Any>, rustc_interface[2ae116c6a4677e35]::passes::start_codegen::{closure#0}>
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_data_structures/src/profiling.rs:844:9
40: 0x7f212f8b8125 - <rustc_session[42d1f407a62e4333]::session::Session>::time::<alloc[c95acf19e9cf6501]::boxed::Box<dyn core[916326d1bf71be52]::any::Any>, rustc_interface[2ae116c6a4677e35]::passes::start_codegen::{closure#0}>
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_session/src/utils.rs:17:50
41: 0x7f212f8b8125 - rustc_interface[2ae116c6a4677e35]::passes::start_codegen
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_interface/src/passes.rs:1252:28
42: 0x7f212f8b8125 - <rustc_interface[2ae116c6a4677e35]::queries::Linker>::codegen_and_build_linker
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_interface/src/queries.rs:33:43
43: 0x7f212e9d305a - rustc_driver_impl[d4a49404c0ba38e5]::run_compiler::{closure#0}::{closure#2}
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_driver_impl/src/lib.rs:391:18
44: 0x7f212e9d305a - rustc_interface[2ae116c6a4677e35]::passes::create_and_enter_global_ctxt::<core[916326d1bf71be52]::option::Option<rustc_interface[2ae116c6a4677e35]::queries::Linker>, rustc_driver_impl[d4a49404c0ba38e5]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_interface/src/passes.rs:1018:27
45: 0x7f212e9d305a - <rustc_middle[7e36f9941c1715b2]::ty::context::GlobalCtxt>::enter::<rustc_interface[2ae116c6a4677e35]::passes::create_and_enter_global_ctxt<core[916326d1bf71be52]::option::Option<rustc_interface[2ae116c6a4677e35]::queries::Linker>, rustc_driver_impl[d4a49404c0ba38e5]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}, core[916326d1bf71be52]::option::Option<rustc_interface[2ae116c6a4677e35]::queries::Linker>>::{closure#1}
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_middle/src/ty/context.rs:1643:37
46: 0x7f212e9d305a - rustc_middle[7e36f9941c1715b2]::ty::context::tls::enter_context::<<rustc_middle[7e36f9941c1715b2]::ty::context::GlobalCtxt>::enter<rustc_interface[2ae116c6a4677e35]::passes::create_and_enter_global_ctxt<core[916326d1bf71be52]::option::Option<rustc_interface[2ae116c6a4677e35]::queries::Linker>, rustc_driver_impl[d4a49404c0ba38e5]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}, core[916326d1bf71be52]::option::Option<rustc_interface[2ae116c6a4677e35]::queries::Linker>>::{closure#1}, core[916326d1bf71be52]::option::Option<rustc_interface[2ae116c6a4677e35]::queries::Linker>>::{closure#0}
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_middle/src/ty/context/tls.rs:60:9
47: 0x7f212e9d305a - <std[8936757b9337e6a3]::thread::local::LocalKey<core[916326d1bf71be52]::cell::Cell<*const ()>>>::try_with::<rustc_middle[7e36f9941c1715b2]::ty::context::tls::enter_context<<rustc_middle[7e36f9941c1715b2]::ty::context::GlobalCtxt>::enter<rustc_interface[2ae116c6a4677e35]::passes::create_and_enter_global_ctxt<core[916326d1bf71be52]::option::Option<rustc_interface[2ae116c6a4677e35]::queries::Linker>, rustc_driver_impl[d4a49404c0ba38e5]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}, core[916326d1bf71be52]::option::Option<rustc_interface[2ae116c6a4677e35]::queries::Linker>>::{closure#1}, core[916326d1bf71be52]::option::Option<rustc_interface[2ae116c6a4677e35]::queries::Linker>>::{closure#0}, core[916326d1bf71be52]::option::Option<rustc_interface[2ae116c6a4677e35]::queries::Linker>>
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/std/src/thread/local.rs:513:12
48: 0x7f212e9d305a - <std[8936757b9337e6a3]::thread::local::LocalKey<core[916326d1bf71be52]::cell::Cell<*const ()>>>::with::<rustc_middle[7e36f9941c1715b2]::ty::context::tls::enter_context<<rustc_middle[7e36f9941c1715b2]::ty::context::GlobalCtxt>::enter<rustc_interface[2ae116c6a4677e35]::passes::create_and_enter_global_ctxt<core[916326d1bf71be52]::option::Option<rustc_interface[2ae116c6a4677e35]::queries::Linker>, rustc_driver_impl[d4a49404c0ba38e5]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}, core[916326d1bf71be52]::option::Option<rustc_interface[2ae116c6a4677e35]::queries::Linker>>::{closure#1}, core[916326d1bf71be52]::option::Option<rustc_interface[2ae116c6a4677e35]::queries::Linker>>::{closure#0}, core[916326d1bf71be52]::option::Option<rustc_interface[2ae116c6a4677e35]::queries::Linker>>
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/std/src/thread/local.rs:477:20
49: 0x7f212e9d305a - rustc_middle[7e36f9941c1715b2]::ty::context::tls::enter_context::<<rustc_middle[7e36f9941c1715b2]::ty::context::GlobalCtxt>::enter<rustc_interface[2ae116c6a4677e35]::passes::create_and_enter_global_ctxt<core[916326d1bf71be52]::option::Option<rustc_interface[2ae116c6a4677e35]::queries::Linker>, rustc_driver_impl[d4a49404c0ba38e5]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}, core[916326d1bf71be52]::option::Option<rustc_interface[2ae116c6a4677e35]::queries::Linker>>::{closure#1}, core[916326d1bf71be52]::option::Option<rustc_interface[2ae116c6a4677e35]::queries::Linker>>
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_middle/src/ty/context/tls.rs:57:9
50: 0x7f212e9d305a - <rustc_middle[7e36f9941c1715b2]::ty::context::GlobalCtxt>::enter::<rustc_interface[2ae116c6a4677e35]::passes::create_and_enter_global_ctxt<core[916326d1bf71be52]::option::Option<rustc_interface[2ae116c6a4677e35]::queries::Linker>, rustc_driver_impl[d4a49404c0ba38e5]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}, core[916326d1bf71be52]::option::Option<rustc_interface[2ae116c6a4677e35]::queries::Linker>>
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_middle/src/ty/context.rs:1643:9
51: 0x7f212e9d305a - <rustc_middle[7e36f9941c1715b2]::ty::context::TyCtxt>::create_global_ctxt::<core[916326d1bf71be52]::option::Option<rustc_interface[2ae116c6a4677e35]::queries::Linker>, rustc_interface[2ae116c6a4677e35]::passes::create_and_enter_global_ctxt<core[916326d1bf71be52]::option::Option<rustc_interface[2ae116c6a4677e35]::queries::Linker>, rustc_driver_impl[d4a49404c0ba38e5]::run_compiler::{closure#0}::{closure#2}>::{closure#2}::{closure#0}>
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_middle/src/ty/context.rs:1850:13
52: 0x7f212e9d305a - rustc_interface[2ae116c6a4677e35]::passes::create_and_enter_global_ctxt::<core[916326d1bf71be52]::option::Option<rustc_interface[2ae116c6a4677e35]::queries::Linker>, rustc_driver_impl[d4a49404c0ba38e5]::run_compiler::{closure#0}::{closure#2}>::{closure#2}
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_interface/src/passes.rs:985:9
53: 0x7f212e9d305a - <rustc_interface[2ae116c6a4677e35]::passes::create_and_enter_global_ctxt<core[916326d1bf71be52]::option::Option<rustc_interface[2ae116c6a4677e35]::queries::Linker>, rustc_driver_impl[d4a49404c0ba38e5]::run_compiler::{closure#0}::{closure#2}>::{closure#2} as core[916326d1bf71be52]::ops::function::FnOnce<(&rustc_session[42d1f407a62e4333]::session::Session, rustc_middle[7e36f9941c1715b2]::ty::context::CurrentGcx, alloc[c95acf19e9cf6501]::sync::Arc<rustc_data_structures[a569e71b4b18e7cd]::jobserver::Proxy>, &std[8936757b9337e6a3]::sync::once_lock::OnceLock<rustc_middle[7e36f9941c1715b2]::ty::context::GlobalCtxt>, &rustc_data_structures[a569e71b4b18e7cd]::sync::worker_local::WorkerLocal<rustc_middle[7e36f9941c1715b2]::arena::Arena>, &rustc_data_structures[a569e71b4b18e7cd]::sync::worker_local::WorkerLocal<rustc_hir[f94a9678c249b8a2]::Arena>, rustc_driver_impl[d4a49404c0ba38e5]::run_compiler::{closure#0}::{closure#2})>>::call_once::{shim:vtable#0}
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/core/src/ops/function.rs:250:5
54: 0x7f212e954784 - <alloc[c95acf19e9cf6501]::boxed::Box<dyn for<'a> core[916326d1bf71be52]::ops::function::FnOnce<(&'a rustc_session[42d1f407a62e4333]::session::Session, rustc_middle[7e36f9941c1715b2]::ty::context::CurrentGcx, alloc[c95acf19e9cf6501]::sync::Arc<rustc_data_structures[a569e71b4b18e7cd]::jobserver::Proxy>, &'a std[8936757b9337e6a3]::sync::once_lock::OnceLock<rustc_middle[7e36f9941c1715b2]::ty::context::GlobalCtxt<'a>>, &'a rustc_data_structures[a569e71b4b18e7cd]::sync::worker_local::WorkerLocal<rustc_middle[7e36f9941c1715b2]::arena::Arena<'a>>, &'a rustc_data_structures[a569e71b4b18e7cd]::sync::worker_local::WorkerLocal<rustc_hir[f94a9678c249b8a2]::Arena<'a>>, rustc_driver_impl[d4a49404c0ba38e5]::run_compiler::{closure#0}::{closure#2}), Output = core[916326d1bf71be52]::option::Option<rustc_interface[2ae116c6a4677e35]::queries::Linker>>> as core[916326d1bf71be52]::ops::function::FnOnce<(&rustc_session[42d1f407a62e4333]::session::Session, rustc_middle[7e36f9941c1715b2]::ty::context::CurrentGcx, alloc[c95acf19e9cf6501]::sync::Arc<rustc_data_structures[a569e71b4b18e7cd]::jobserver::Proxy>, &std[8936757b9337e6a3]::sync::once_lock::OnceLock<rustc_middle[7e36f9941c1715b2]::ty::context::GlobalCtxt>, &rustc_data_structures[a569e71b4b18e7cd]::sync::worker_local::WorkerLocal<rustc_middle[7e36f9941c1715b2]::arena::Arena>, &rustc_data_structures[a569e71b4b18e7cd]::sync::worker_local::WorkerLocal<rustc_hir[f94a9678c249b8a2]::Arena>, rustc_driver_impl[d4a49404c0ba38e5]::run_compiler::{closure#0}::{closure#2})>>::call_once
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/alloc/src/boxed.rs:2206:9
55: 0x7f212e954784 - rustc_interface[2ae116c6a4677e35]::passes::create_and_enter_global_ctxt::<core[916326d1bf71be52]::option::Option<rustc_interface[2ae116c6a4677e35]::queries::Linker>, rustc_driver_impl[d4a49404c0ba38e5]::run_compiler::{closure#0}::{closure#2}>
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_interface/src/passes.rs:1026:5
56: 0x7f212e9ca35c - rustc_driver_impl[d4a49404c0ba38e5]::run_compiler::{closure#0}
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_driver_impl/src/lib.rs:348:22
57: 0x7f212e9ca35c - rustc_interface[2ae116c6a4677e35]::interface::run_compiler::<(), rustc_driver_impl[d4a49404c0ba38e5]::run_compiler::{closure#0}>::{closure#1}::{closure#0}
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_interface/src/interface.rs:532:80
58: 0x7f212e9ca35c - <core[916326d1bf71be52]::panic::unwind_safe::AssertUnwindSafe<rustc_interface[2ae116c6a4677e35]::interface::run_compiler<(), rustc_driver_impl[d4a49404c0ba38e5]::run_compiler::{closure#0}>::{closure#1}::{closure#0}> as core[916326d1bf71be52]::ops::function::FnOnce<()>>::call_once
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/core/src/panic/unwind_safe.rs:274:9
59: 0x7f212e9ca35c - std[8936757b9337e6a3]::panicking::catch_unwind::do_call::<core[916326d1bf71be52]::panic::unwind_safe::AssertUnwindSafe<rustc_interface[2ae116c6a4677e35]::interface::run_compiler<(), rustc_driver_impl[d4a49404c0ba38e5]::run_compiler::{closure#0}>::{closure#1}::{closure#0}>, ()>
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/std/src/panicking.rs:581:40
60: 0x7f212e9ca35c - std[8936757b9337e6a3]::panicking::catch_unwind::<(), core[916326d1bf71be52]::panic::unwind_safe::AssertUnwindSafe<rustc_interface[2ae116c6a4677e35]::interface::run_compiler<(), rustc_driver_impl[d4a49404c0ba38e5]::run_compiler::{closure#0}>::{closure#1}::{closure#0}>>
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/std/src/panicking.rs:544:19
61: 0x7f212e9ca35c - std[8936757b9337e6a3]::panic::catch_unwind::<core[916326d1bf71be52]::panic::unwind_safe::AssertUnwindSafe<rustc_interface[2ae116c6a4677e35]::interface::run_compiler<(), rustc_driver_impl[d4a49404c0ba38e5]::run_compiler::{closure#0}>::{closure#1}::{closure#0}>, ()>
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/std/src/panic.rs:359:14
62: 0x7f212e9ca35c - rustc_interface[2ae116c6a4677e35]::interface::run_compiler::<(), rustc_driver_impl[d4a49404c0ba38e5]::run_compiler::{closure#0}>::{closure#1}
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_interface/src/interface.rs:532:23
63: 0x7f212e9b9955 - rustc_interface[2ae116c6a4677e35]::util::run_in_thread_pool_with_globals::<rustc_interface[2ae116c6a4677e35]::interface::run_compiler<(), rustc_driver_impl[d4a49404c0ba38e5]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_interface/src/util.rs:204:17
64: 0x7f212e9b9955 - rustc_interface[2ae116c6a4677e35]::util::run_in_thread_with_globals::<rustc_interface[2ae116c6a4677e35]::util::run_in_thread_pool_with_globals<rustc_interface[2ae116c6a4677e35]::interface::run_compiler<(), rustc_driver_impl[d4a49404c0ba38e5]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}::{closure#0}
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_interface/src/util.rs:158:24
65: 0x7f212e9b9955 - <scoped_tls[3419bf802015e0e0]::ScopedKey<rustc_span[f1cfcd62ed02da19]::SessionGlobals>>::set::<rustc_interface[2ae116c6a4677e35]::util::run_in_thread_with_globals<rustc_interface[2ae116c6a4677e35]::util::run_in_thread_pool_with_globals<rustc_interface[2ae116c6a4677e35]::interface::run_compiler<(), rustc_driver_impl[d4a49404c0ba38e5]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}::{closure#0}, ()>
at /rust/deps/scoped-tls-1.0.1/src/lib.rs:137:9
66: 0x7f212e9b9955 - rustc_span[f1cfcd62ed02da19]::create_session_globals_then::<(), rustc_interface[2ae116c6a4677e35]::util::run_in_thread_with_globals<rustc_interface[2ae116c6a4677e35]::util::run_in_thread_pool_with_globals<rustc_interface[2ae116c6a4677e35]::interface::run_compiler<(), rustc_driver_impl[d4a49404c0ba38e5]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}::{closure#0}>
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_span/src/lib.rs:142:21
67: 0x7f212e9b9955 - rustc_interface[2ae116c6a4677e35]::util::run_in_thread_with_globals::<rustc_interface[2ae116c6a4677e35]::util::run_in_thread_pool_with_globals<rustc_interface[2ae116c6a4677e35]::interface::run_compiler<(), rustc_driver_impl[d4a49404c0ba38e5]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/compiler/rustc_interface/src/util.rs:154:17
68: 0x7f212e9b9955 - std[8936757b9337e6a3]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[2ae116c6a4677e35]::util::run_in_thread_with_globals<rustc_interface[2ae116c6a4677e35]::util::run_in_thread_pool_with_globals<rustc_interface[2ae116c6a4677e35]::interface::run_compiler<(), rustc_driver_impl[d4a49404c0ba38e5]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/std/src/sys/backtrace.rs:166:18
69: 0x7f212e9d4d53 - std[8936757b9337e6a3]::thread::lifecycle::spawn_unchecked::<rustc_interface[2ae116c6a4677e35]::util::run_in_thread_with_globals<rustc_interface[2ae116c6a4677e35]::util::run_in_thread_pool_with_globals<rustc_interface[2ae116c6a4677e35]::interface::run_compiler<(), rustc_driver_impl[d4a49404c0ba38e5]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1}::{closure#0}
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/std/src/thread/lifecycle.rs:91:13
70: 0x7f212e9d4d53 - <core[916326d1bf71be52]::panic::unwind_safe::AssertUnwindSafe<std[8936757b9337e6a3]::thread::lifecycle::spawn_unchecked<rustc_interface[2ae116c6a4677e35]::util::run_in_thread_with_globals<rustc_interface[2ae116c6a4677e35]::util::run_in_thread_pool_with_globals<rustc_interface[2ae116c6a4677e35]::interface::run_compiler<(), rustc_driver_impl[d4a49404c0ba38e5]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1}::{closure#0}> as core[916326d1bf71be52]::ops::function::FnOnce<()>>::call_once
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/core/src/panic/unwind_safe.rs:274:9
71: 0x7f212e9d4d53 - std[8936757b9337e6a3]::panicking::catch_unwind::do_call::<core[916326d1bf71be52]::panic::unwind_safe::AssertUnwindSafe<std[8936757b9337e6a3]::thread::lifecycle::spawn_unchecked<rustc_interface[2ae116c6a4677e35]::util::run_in_thread_with_globals<rustc_interface[2ae116c6a4677e35]::util::run_in_thread_pool_with_globals<rustc_interface[2ae116c6a4677e35]::interface::run_compiler<(), rustc_driver_impl[d4a49404c0ba38e5]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1}::{closure#0}>, ()>
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/std/src/panicking.rs:581:40
72: 0x7f212e9d4d53 - std[8936757b9337e6a3]::panicking::catch_unwind::<(), core[916326d1bf71be52]::panic::unwind_safe::AssertUnwindSafe<std[8936757b9337e6a3]::thread::lifecycle::spawn_unchecked<rustc_interface[2ae116c6a4677e35]::util::run_in_thread_with_globals<rustc_interface[2ae116c6a4677e35]::util::run_in_thread_pool_with_globals<rustc_interface[2ae116c6a4677e35]::interface::run_compiler<(), rustc_driver_impl[d4a49404c0ba38e5]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1}::{closure#0}>>
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/std/src/panicking.rs:544:19
73: 0x7f212e9d4d53 - std[8936757b9337e6a3]::panic::catch_unwind::<core[916326d1bf71be52]::panic::unwind_safe::AssertUnwindSafe<std[8936757b9337e6a3]::thread::lifecycle::spawn_unchecked<rustc_interface[2ae116c6a4677e35]::util::run_in_thread_with_globals<rustc_interface[2ae116c6a4677e35]::util::run_in_thread_pool_with_globals<rustc_interface[2ae116c6a4677e35]::interface::run_compiler<(), rustc_driver_impl[d4a49404c0ba38e5]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1}::{closure#0}>, ()>
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/std/src/panic.rs:359:14
74: 0x7f212e9d4d53 - std[8936757b9337e6a3]::thread::lifecycle::spawn_unchecked::<rustc_interface[2ae116c6a4677e35]::util::run_in_thread_with_globals<rustc_interface[2ae116c6a4677e35]::util::run_in_thread_pool_with_globals<rustc_interface[2ae116c6a4677e35]::interface::run_compiler<(), rustc_driver_impl[d4a49404c0ba38e5]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1}
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/std/src/thread/lifecycle.rs:89:26
75: 0x7f212e9d4d53 - <std[8936757b9337e6a3]::thread::lifecycle::spawn_unchecked<rustc_interface[2ae116c6a4677e35]::util::run_in_thread_with_globals<rustc_interface[2ae116c6a4677e35]::util::run_in_thread_pool_with_globals<rustc_interface[2ae116c6a4677e35]::interface::run_compiler<(), rustc_driver_impl[d4a49404c0ba38e5]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[916326d1bf71be52]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
at /rustc-dev/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/core/src/ops/function.rs:250:5
76: 0x7f2131f35cdf - <alloc[c95acf19e9cf6501]::boxed::Box<dyn core[916326d1bf71be52]::ops::function::FnOnce<(), Output = ()> + core[916326d1bf71be52]::marker::Send> as core[916326d1bf71be52]::ops::function::FnOnce<()>>::call_once
at /rustc/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/alloc/src/boxed.rs:2206:9
77: 0x7f2131f35cdf - <std[8936757b9337e6a3]::sys::thread::unix::Thread>::new::thread_start
at /rustc/a293cc4af8b26701c42738381c0c6f9d2ba881e0/library/std/src/sys/thread/unix.rs:127:17
78: 0x7f212ba9698b - <unknown>
79: 0x7f212bb1a9cc - <unknown>
80: 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 make sure that you have updated to the latest nightly
note: rustc 1.95.0-nightly (a293cc4af 2026-01-30) running on x86_64-unknown-linux-gnu
note: compiler flags: -Z sanitizer=cfi -C codegen-units=1 -C lto -C unsafe-allow-abi-mismatch=sanitizer -Z dump-mir-dir=dir
query stack during panic:
end of query stack
warning: 5 warnings emitted
@rustbot label +F-min_generic_const_args
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-control-flow-integrityArea: Control Flow Integrity (CFI) security mitigationArea: Control Flow Integrity (CFI) security mitigationC-bugCategory: This is a bug.Category: This is a bug.F-min_generic_const_args`#![feature(min_generic_const_args)]``#![feature(min_generic_const_args)]`I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.requires-debug-assertionsThis issue requires a build of rustc or tooling with debug-assertions in some wayThis issue requires a build of rustc or tooling with debug-assertions in some way