Open
Description
I tried this code:
macro_rules! demo {
() => {
#[std::autodiff::autodiff_reverse(fd, Active, Active)]
fn f(x: f64) -> f64 {
x * x
}
};
}
demo!();
I expected to see this happen: No error
Instead, this happened:
error[E0425]: cannot find value `dret` in this scope
--> src/lib.rs:42:9
|
42 | #[std::autodiff::autodiff_reverse(fd, Active, Active)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
Meta
rustc --version --verbose
:
rustc 1.90.0-nightly (48aee7e38 2025-07-03)
binary: rustc
commit-hash: 48aee7e383503c234cce4206dee9f19f57edb617
commit-date: 2025-07-03
host: x86_64-unknown-linux-gnu
release: 1.90.0-nightly
LLVM version: 20.1.7