-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Open
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-autodiff`#![feature(autodiff)]``#![feature(autodiff)]`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.
Description
snippet:
use std::autodiff::autodiff_reverse;
#[autodiff_reverse(2.0f)]
fn f() {}Version information
rustc 1.94.0-nightly (2ca7bcd03 2025-12-23)
binary: rustc
commit-hash: 2ca7bcd03b87b52f7055a59b817443b0ac4a530d
commit-date: 2025-12-23
host: x86_64-unknown-linux-gnu
release: 1.94.0-nightly
LLVM version: 21.1.8
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc
Program output
error[E0658]: use of unstable library feature `autodiff`
--> /tmp/icemaker_global_tempdir.4K5QMhZtihrW/rustc_testrunner_tmpdir_reporting.9B4gKu0gRZc5/mvce.rs:2:3
|
2 | #[autodiff_reverse(2.0f)]
| ^^^^^^^^^^^^^^^^
|
= note: see issue #124509 <https://github.com/rust-lang/rust/issues/124509> for more information
= help: add `#![feature(autodiff)]` to the crate attributes to enable
= note: this compiler was built on 2025-12-23; consider upgrading it if it is out of date
error: invalid suffix `f` for float literal
--> /tmp/icemaker_global_tempdir.4K5QMhZtihrW/rustc_testrunner_tmpdir_reporting.9B4gKu0gRZc5/mvce.rs:2:20
|
2 | #[autodiff_reverse(2.0f)]
| ^^^^ invalid suffix `f`
|
= help: valid suffixes are `f32` and `f64`
thread 'rustc' (3569131) panicked at /rustc-dev/2ca7bcd03b87b52f7055a59b817443b0ac4a530d/compiler/rustc_builtin_macros/src/autodiff.rs:58:39:
called `Option::unwrap()` on a `None` value
stack backtrace:
0: 0x7fb7a5e2c3a3 - <<std[243ef3771c46e43a]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[c088ff38143eb53e]::fmt::Display>::fmt
1: 0x7fb7a6410648 - core[c088ff38143eb53e]::fmt::write
2: 0x7fb7a5e42af6 - <std[243ef3771c46e43a]::sys::stdio::unix::Stderr as std[243ef3771c46e43a]::io::Write>::write_fmt
3: 0x7fb7a5e02b48 - std[243ef3771c46e43a]::panicking::default_hook::{closure#0}
4: 0x7fb7a5e20213 - std[243ef3771c46e43a]::panicking::default_hook
5: 0x7fb7a4e10d77 - std[243ef3771c46e43a]::panicking::update_hook::<alloc[baa86124b2c3e6f2]::boxed::Box<rustc_driver_impl[e986b619aabff65e]::install_ice_hook::{closure#1}>>::{closure#0}
6: 0x7fb7a5e204f2 - std[243ef3771c46e43a]::panicking::panic_with_hook
7: 0x7fb7a5e02c3a - std[243ef3771c46e43a]::panicking::panic_handler::{closure#0}
8: 0x7fb7a5df9c19 - std[243ef3771c46e43a]::sys::backtrace::__rust_end_short_backtrace::<std[243ef3771c46e43a]::panicking::panic_handler::{closure#0}, !>
9: 0x7fb7a5e046fd - __rustc[6d0b6af41dd8415b]::rust_begin_unwind
10: 0x7fb7a2fe611c - core[c088ff38143eb53e]::panicking::panic_fmt
11: 0x7fb7a25bd872 - core[c088ff38143eb53e]::panicking::panic
12: 0x7fb7a2ed7e79 - core[c088ff38143eb53e]::option::unwrap_failed
13: 0x7fb7a4ba21b1 - rustc_builtin_macros[c43dc9e402b49fb2]::autodiff::llvm_enzyme::first_ident
14: 0x7fb7a4ba5a9c - rustc_builtin_macros[c43dc9e402b49fb2]::autodiff::llvm_enzyme::expand_with_mode
15: 0x7fb7a4bb81f8 - <rustc_builtin_macros[c43dc9e402b49fb2]::autodiff::llvm_enzyme::expand_reverse as rustc_expand[7ba574a324a285b6]::base::MultiItemModifier>::expand
16: 0x7fb7a7a1a288 - <rustc_expand[7ba574a324a285b6]::expand::MacroExpander>::fully_expand_fragment
17: 0x7fb7a79fec12 - <rustc_expand[7ba574a324a285b6]::expand::MacroExpander>::expand_crate
18: 0x7fb7a6b715f3 - rustc_interface[577997324878ea43]::passes::configure_and_expand
19: 0x7fb7a761bad8 - rustc_interface[577997324878ea43]::passes::resolver_for_lowering_raw
20: 0x7fb7a761b84d - rustc_query_impl[3af702bc24a35b84]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[3af702bc24a35b84]::query_impl::resolver_for_lowering_raw::dynamic_query::{closure#2}::{closure#0}, rustc_middle[395a2484b1db1a27]::query::erase::Erased<[u8; 16usize]>>
21: 0x7fb7a761b827 - <rustc_query_impl[3af702bc24a35b84]::query_impl::resolver_for_lowering_raw::dynamic_query::{closure#2} as core[c088ff38143eb53e]::ops::function::FnOnce<(rustc_middle[395a2484b1db1a27]::ty::context::TyCtxt, ())>>::call_once
22: 0x7fb7a75cb35f - rustc_query_system[fae14337e0c02060]::query::plumbing::try_execute_query::<rustc_query_impl[3af702bc24a35b84]::DynamicConfig<rustc_query_system[fae14337e0c02060]::query::caches::SingleCache<rustc_middle[395a2484b1db1a27]::query::erase::Erased<[u8; 16usize]>>, false, false, false>, rustc_query_impl[3af702bc24a35b84]::plumbing::QueryCtxt, false>
23: 0x7fb7a75caec4 - rustc_query_impl[3af702bc24a35b84]::query_impl::resolver_for_lowering_raw::get_query_non_incr::__rust_end_short_backtrace
24: 0x7fb7a77a90f8 - <rustc_interface[577997324878ea43]::passes::create_and_enter_global_ctxt<core[c088ff38143eb53e]::option::Option<rustc_interface[577997324878ea43]::queries::Linker>, rustc_driver_impl[e986b619aabff65e]::run_compiler::{closure#0}::{closure#2}>::{closure#2} as core[c088ff38143eb53e]::ops::function::FnOnce<(&rustc_session[9908f9ef7e13fd8d]::session::Session, rustc_middle[395a2484b1db1a27]::ty::context::CurrentGcx, alloc[baa86124b2c3e6f2]::sync::Arc<rustc_data_structures[75601f20e3d68749]::jobserver::Proxy>, &std[243ef3771c46e43a]::sync::once_lock::OnceLock<rustc_middle[395a2484b1db1a27]::ty::context::GlobalCtxt>, &rustc_data_structures[75601f20e3d68749]::sync::worker_local::WorkerLocal<rustc_middle[395a2484b1db1a27]::arena::Arena>, &rustc_data_structures[75601f20e3d68749]::sync::worker_local::WorkerLocal<rustc_hir[38bedddefeb6b9a6]::Arena>, rustc_driver_impl[e986b619aabff65e]::run_compiler::{closure#0}::{closure#2})>>::call_once::{shim:vtable#0}
25: 0x7fb7a763cc8a - rustc_interface[577997324878ea43]::interface::run_compiler::<(), rustc_driver_impl[e986b619aabff65e]::run_compiler::{closure#0}>::{closure#1}
26: 0x7fb7a758ffce - std[243ef3771c46e43a]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[577997324878ea43]::util::run_in_thread_with_globals<rustc_interface[577997324878ea43]::util::run_in_thread_pool_with_globals<rustc_interface[577997324878ea43]::interface::run_compiler<(), rustc_driver_impl[e986b619aabff65e]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
27: 0x7fb7a758fda0 - <std[243ef3771c46e43a]::thread::lifecycle::spawn_unchecked<rustc_interface[577997324878ea43]::util::run_in_thread_with_globals<rustc_interface[577997324878ea43]::util::run_in_thread_pool_with_globals<rustc_interface[577997324878ea43]::interface::run_compiler<(), rustc_driver_impl[e986b619aabff65e]::run_compiler::{closure#0}>::{closure#1}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[c088ff38143eb53e]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
28: 0x7fb7a7595b38 - <std[243ef3771c46e43a]::sys::thread::unix::Thread>::new::thread_start
29: 0x7fb7a0e9698b - <unknown>
30: 0x7fb7a0f1a9cc - <unknown>
31: 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.94.0-nightly (2ca7bcd03 2025-12-23) running on x86_64-unknown-linux-gnu
query stack during panic:
#0 [resolver_for_lowering_raw] getting the resolver for lowering
end of query stack
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0658`.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-autodiff`#![feature(autodiff)]``#![feature(autodiff)]`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.