Skip to content

ICE building glam: Projecting into SIMD type std::arch::aarch64::float32x4_t is banned by MCP#838 #144621

@kpreid

Description

@kpreid

Code

[package]
name = "foo"
version = "0.1.0"
edition = "2024"

[dependencies]
glam = { version = "0.30.5" }

[profile.dev]
opt-level = 2
overflow-checks = true

Then cargo check or cargo build.

Meta

rustc --version --verbose:

rustc 1.90.0-nightly (498ae9fed 2025-07-28)
binary: rustc
commit-hash: 498ae9fed2e7d90821d70a048f3770f91af08957
commit-date: 2025-07-28
host: aarch64-apple-darwin
release: 1.90.0-nightly
LLVM version: 20.1.8

Error output

error: internal compiler error: compiler/rustc_mir_transform/src/validate.rs:80:25: broken MIR in Item(DefId(0:35261 ~ glam[4582]::euler::{impl#44}::to_euler_angles)) (after phase change to runtime-optimized) at bb0[5]:
                                Projecting into SIMD type std::arch::aarch64::float32x4_t is banned by MCP#838
   --> /Users/kpreid/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/glam-0.30.5/src/euler.rs:410:34
    |
410 |                 $mat3::from_mat4(self).to_euler_angles(order)
    |                                  ^^^^
...
435 | impl_mat4_to_euler!(f32, Mat4, Mat3);
    | ------------------------------------ in this macro invocation
    |
    = note: this error: internal compiler error originates in the macro `impl_mat4_to_euler` (in Nightly builds, run with -Z macro-backtrace for more info)


thread 'rustc' panicked at compiler/rustc_mir_transform/src/validate.rs:80:25:
Box<dyn Any>
Backtrace

stack backtrace:
   0:        0x10e89cb4c - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h2c8dadb96be3f8dc
   1:        0x10bd78670 - core::fmt::write::haea1839b4421f097
   2:        0x10e891184 - std::io::Write::write_fmt::h829d20f6c5614c8f
   3:        0x10e89ca0c - std::sys::backtrace::BacktraceLock::print::h9d16fad313b69287
   4:        0x10e8a15c0 - std::panicking::default_hook::{{closure}}::hd647fc9fea98ee68
   5:        0x10e8a1298 - std::panicking::default_hook::h438fdb7239b92b6b
   6:        0x10c96f1ac - rustc_driver_impl[c764e17e85da8204]::install_ice_hook::{closure#1}
   7:        0x10e8a1f4c - std::panicking::rust_panic_with_hook::h14f7a21fdd463b8b
   8:        0x10c99f534 - std[b05d56cfd8fca740]::panicking::begin_panic::<rustc_errors[1c7534ae315a5042]::ExplicitBug>::{closure#0}
   9:        0x10c98df40 - std[b05d56cfd8fca740]::sys::backtrace::__rust_end_short_backtrace::<std[b05d56cfd8fca740]::panicking::begin_panic<rustc_errors[1c7534ae315a5042]::ExplicitBug>::{closure#0}, !>
  10:        0x11153f890 - std[b05d56cfd8fca740]::panicking::begin_panic::<rustc_errors[1c7534ae315a5042]::ExplicitBug>
  11:        0x11153fdd0 - <rustc_errors[1c7534ae315a5042]::diagnostic::BugAbort as rustc_errors[1c7534ae315a5042]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
  12:        0x1115ae330 - <rustc_errors[1c7534ae315a5042]::DiagCtxtHandle>::span_bug::<rustc_span[383248f629c63a7f]::span_encoding::Span, alloc[e2705810b410854d]::string::String>
  13:        0x1115b7208 - rustc_middle[ff00f450670e31a2]::util::bug::opt_span_bug_fmt::<rustc_span[383248f629c63a7f]::span_encoding::Span>::{closure#0}
  14:        0x10d61951c - rustc_middle[ff00f450670e31a2]::ty::context::tls::with_opt::<rustc_middle[ff00f450670e31a2]::util::bug::opt_span_bug_fmt<rustc_span[383248f629c63a7f]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  15:        0x10d618fe4 - rustc_middle[ff00f450670e31a2]::ty::context::tls::with_context_opt::<rustc_middle[ff00f450670e31a2]::ty::context::tls::with_opt<rustc_middle[ff00f450670e31a2]::util::bug::opt_span_bug_fmt<rustc_span[383248f629c63a7f]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  16:        0x1115b7178 - rustc_middle[ff00f450670e31a2]::util::bug::span_bug_fmt::<rustc_span[383248f629c63a7f]::span_encoding::Span>
  17:        0x10d9a6a08 - <rustc_mir_transform[c3f80c3e19acb41d]::validate::CfgChecker>::fail::<alloc[e2705810b410854d]::string::String>
  18:        0x10d9a5b34 - <rustc_mir_transform[c3f80c3e19acb41d]::validate::Validator as rustc_mir_transform[c3f80c3e19acb41d]::pass_manager::MirPass>::run_pass
  19:        0x10d8f7198 - rustc_mir_transform[c3f80c3e19acb41d]::pass_manager::run_passes_inner
  20:        0x10d91bf5c - rustc_mir_transform[c3f80c3e19acb41d]::run_optimization_passes
  21:        0x10d91c3c0 - rustc_mir_transform[c3f80c3e19acb41d]::optimized_mir
  22:        0x10e00eb50 - rustc_query_impl[710479fe5bc1800b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[710479fe5bc1800b]::query_impl::optimized_mir::dynamic_query::{closure#2}::{closure#0}, rustc_middle[ff00f450670e31a2]::query::erase::Erased<[u8; 8usize]>>
  23:        0x10dde78e0 - rustc_query_system[8d269a2fdd66b5b0]::query::plumbing::try_execute_query::<rustc_query_impl[710479fe5bc1800b]::DynamicConfig<rustc_query_system[8d269a2fdd66b5b0]::query::caches::DefIdCache<rustc_middle[ff00f450670e31a2]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[710479fe5bc1800b]::plumbing::QueryCtxt, false>
  24:        0x10e02b5f8 - rustc_query_impl[710479fe5bc1800b]::query_impl::optimized_mir::get_query_non_incr::__rust_end_short_backtrace
  25:        0x10d8f8f5c - rustc_mir_transform[c3f80c3e19acb41d]::cross_crate_inline::cross_crate_inlinable
  26:        0x10e011cd4 - rustc_query_impl[710479fe5bc1800b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[710479fe5bc1800b]::query_impl::cross_crate_inlinable::dynamic_query::{closure#2}::{closure#0}, rustc_middle[ff00f450670e31a2]::query::erase::Erased<[u8; 1usize]>>
  27:        0x10dddc258 - rustc_query_system[8d269a2fdd66b5b0]::query::plumbing::try_execute_query::<rustc_query_impl[710479fe5bc1800b]::DynamicConfig<rustc_query_system[8d269a2fdd66b5b0]::query::caches::DefIdCache<rustc_middle[ff00f450670e31a2]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[710479fe5bc1800b]::plumbing::QueryCtxt, false>
  28:        0x10e0a4a0c - rustc_query_impl[710479fe5bc1800b]::query_impl::cross_crate_inlinable::get_query_non_incr::__rust_end_short_backtrace
  29:        0x10dc61150 - rustc_passes[dfb39456de595ce0]::reachable::recursively_reachable
  30:        0x10dc63b3c - rustc_passes[dfb39456de595ce0]::reachable::reachable_set
  31:        0x10e00ebcc - rustc_query_impl[710479fe5bc1800b]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[710479fe5bc1800b]::query_impl::reachable_set::dynamic_query::{closure#2}::{closure#0}, rustc_middle[ff00f450670e31a2]::query::erase::Erased<[u8; 8usize]>>
  32:        0x10ddf4c54 - rustc_query_system[8d269a2fdd66b5b0]::query::plumbing::try_execute_query::<rustc_query_impl[710479fe5bc1800b]::DynamicConfig<rustc_query_system[8d269a2fdd66b5b0]::query::caches::SingleCache<rustc_middle[ff00f450670e31a2]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[710479fe5bc1800b]::plumbing::QueryCtxt, false>
  33:        0x10e04e888 - rustc_query_impl[710479fe5bc1800b]::query_impl::reachable_set::get_query_non_incr::__rust_end_short_backtrace
  34:        0x10d49eff8 - <rustc_metadata[7a8e59b443ce0166]::rmeta::encoder::EncodeContext>::encode_crate_root
  35:        0x111598df4 - rustc_metadata[7a8e59b443ce0166]::rmeta::encoder::encode_metadata::{closure#3}::{closure#0}
  36:        0x10d47bf10 - <rustc_metadata[7a8e59b443ce0166]::rmeta::encoder::encode_metadata::{closure#3} as core[9fdc13437c3067b0]::ops::function::FnOnce<(rustc_middle[ff00f450670e31a2]::ty::context::TyCtxt, &std[b05d56cfd8fca740]::path::Path)>>::call_once
  37:        0x10d5039e0 - rustc_metadata[7a8e59b443ce0166]::rmeta::encoder::encode_metadata
  38:        0x10d4ca17c - rustc_metadata[7a8e59b443ce0166]::fs::encode_and_write_metadata
  39:        0x10d259450 - <rustc_interface[57fce32a49ee6398]::queries::Linker>::codegen_and_build_linker
  40:        0x10c8d8060 - rustc_interface[57fce32a49ee6398]::passes::create_and_enter_global_ctxt::<core[9fdc13437c3067b0]::option::Option<rustc_interface[57fce32a49ee6398]::queries::Linker>, rustc_driver_impl[c764e17e85da8204]::run_compiler::{closure#0}::{closure#2}>
  41:        0x10c91fd88 - rustc_interface[57fce32a49ee6398]::interface::run_compiler::<(), rustc_driver_impl[c764e17e85da8204]::run_compiler::{closure#0}>::{closure#1}
  42:        0x10c9151f4 - std[b05d56cfd8fca740]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[57fce32a49ee6398]::util::run_in_thread_with_globals<rustc_interface[57fce32a49ee6398]::util::run_in_thread_pool_with_globals<rustc_interface[57fce32a49ee6398]::interface::run_compiler<(), rustc_driver_impl[c764e17e85da8204]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  43:        0x10c9220c4 - <<std[b05d56cfd8fca740]::thread::Builder>::spawn_unchecked_<rustc_interface[57fce32a49ee6398]::util::run_in_thread_with_globals<rustc_interface[57fce32a49ee6398]::util::run_in_thread_pool_with_globals<rustc_interface[57fce32a49ee6398]::interface::run_compiler<(), rustc_driver_impl[c764e17e85da8204]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[9fdc13437c3067b0]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  44:        0x10e8a52bc - std::sys::pal::unix::thread::Thread::new::thread_start::h538430a11caebc44
  45:        0x18b1bec0c - __pthread_cond_wait

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/kpreid/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/glam-0.30.5/rustc-ice-2025-07-29T03_57_24-72327.txt` to your bug report

note: compiler flags: --crate-type lib -C opt-level=2 -C embed-bitcode=no -C debuginfo=2 -C split-debuginfo=unpacked -C debug-assertions=on

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [optimized_mir] optimizing MIR for `euler::<impl at /Users/kpreid/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/glam-0.30.5/src/euler.rs:404:9: 404:31>::to_euler_angles`
#1 [cross_crate_inlinable] whether the item should be made inlinable across crates
... and 1 other queries... use `env RUST_BACKTRACE=1` to see the full query stack
error: could not compile `glam` (lib)

Caused by:
  process didn't exit successfully: `/Users/kpreid/.rustup/toolchains/nightly-aarch64-apple-darwin/bin/rustc --crate-name glam --edition=2021 /Users/kpreid/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/glam-0.30.5/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=211 --crate-type lib --emit=dep-info,metadata,link -C opt-level=2 -C embed-bitcode=no -C debuginfo=2 -C split-debuginfo=unpacked --warn=unexpected_cfgs --check-cfg 'cfg(target_arch, values("spirv"))' -C debug-assertions=on --cfg 'feature="default"' --cfg 'feature="std"' --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("approx", "bytecheck", "bytemuck", "core-simd", "cuda", "debug-glam-assert", "default", "fast-math", "glam-assert", "libm", "mint", "nostd-libm", "rand", "rkyv", "scalar-math", "serde", "speedy", "std"))' -C metadata=53063e6929dcaebc -C extra-filename=-28fe2bab7d0849f1 --out-dir /Users/kpreid/Projects/rust/scratch/foo/target/debug/deps -L dependency=/Users/kpreid/Projects/rust/scratch/foo/target/debug/deps --cap-lints allow` (exit status: 101)

@rustbot label regression-from-stable-to-nightly

Metadata

Metadata

Assignees

Labels

A-mir-optArea: MIR optimizationsC-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️I-prioritizeIssue: Indicates that prioritization has been requested for this issue.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions