about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src
diff options
context:
space:
mode:
authorStuart Cook <Zalathar@users.noreply.github.com>2025-05-19 13:24:53 +1000
committerGitHub <noreply@github.com>2025-05-19 13:24:53 +1000
commit0513e3b46307d9bd50d8d943e350f2294b9478f3 (patch)
treedd7382d2c472ed792850226c97d128b3b7f0bccd /compiler/rustc_mir_transform/src
parente42bbfe1f7c26f8760a99c4b1f27d33aba1040bb (diff)
parenta504759afd3aa8338ebcb4ddc7b042de14a29642 (diff)
downloadrust-0513e3b46307d9bd50d8d943e350f2294b9478f3.tar.gz
rust-0513e3b46307d9bd50d8d943e350f2294b9478f3.zip
Rollup merge of #140049 - haenoe:fix-autodiff-generics, r=ZuseZ4
fix autodiff macro on generic functions

heloo there!
This short PR allows applying the `autodiff` macro to generic functions like this one.
It only touches the frontend part, since the `rustc_autodiff` macro can already handle generics.
```rust
#[autodiff(d_square, Reverse, Duplicated, Active)]
fn square<T: std::ops::Mul<Output = T> + Copy>(x: &T) -> T {
    *x * *x
}
```
Thanks to Manuel for creating an issue on this. For more information on this see #140032
r? `@ZuseZ4`

As always: thanks for any piece of feedback!!

Fixes: #140032
Tracking issue for autodiff: https://github.com/rust-lang/rust/issues/124509
Diffstat (limited to 'compiler/rustc_mir_transform/src')
0 files changed, 0 insertions, 0 deletions