Files
rust/tests/ui/autodiff/zst.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
378 B
Rust
Raw Normal View History

2025-08-03 11:12:34 +00:00
//@ 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() {}