Files
rust/tests/ui/autodiff/zst.rs
Marcelo Domínguez 0bf85d35ec Support ZST args
2025-09-17 12:11:27 +00:00

18 lines
378 B
Rust

//@ compile-flags: -Zautodiff=Enable -C opt-level=3 -Clto=fat
//@ no-prefer-dynamic
//@ needs-enzyme
//@ build-pass
// Check that differentiating functions with ZST args does not break
#![feature(autodiff)]
#[core::autodiff::autodiff_forward(fd_inner, Const, Dual)]
fn f(_zst: (), _x: &mut f64) {}
fn fd(x: &mut f64, xd: &mut f64) {
fd_inner((), x, xd);
}
fn main() {}