diff options
| author | Manuel Drehwald <git@manuel.drehwald.info> | 2025-07-03 15:32:02 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-03 15:32:02 -0700 |
| commit | 3fd66139ef9fe27b56d8f3821a988161e9ff443b (patch) | |
| tree | faba6eb4604fe2571bcafcc475fc37f38fdd4428 /src | |
| parent | e82121f812be623f1da1c5e7fef79e0ddf471d8f (diff) | |
| parent | 90d54a1276e2061a3bbd547e0d422cf849a0511b (diff) | |
| download | rust-3fd66139ef9fe27b56d8f3821a988161e9ff443b.tar.gz rust-3fd66139ef9fe27b56d8f3821a988161e9ff443b.zip | |
Merge pull request #2488 from rust-lang/autodiff-doc-updates
adjust autodiff docs, after splitting up autodiff into two macros
Diffstat (limited to 'src')
| -rw-r--r-- | src/doc/rustc-dev-guide/src/autodiff/internals.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/doc/rustc-dev-guide/src/autodiff/internals.md b/src/doc/rustc-dev-guide/src/autodiff/internals.md index 0093ef044c8..c1b31a0e4bd 100644 --- a/src/doc/rustc-dev-guide/src/autodiff/internals.md +++ b/src/doc/rustc-dev-guide/src/autodiff/internals.md @@ -2,11 +2,11 @@ The `std::autodiff` module in Rust allows differentiable programming: ```rust #![feature(autodiff)] -use std::autodiff::autodiff; +use std::autodiff::*; // f(x) = x * x, f'(x) = 2.0 * x // bar therefore returns (x * x, 2.0 * x) -#[autodiff(bar, Reverse, Active, Active)] +#[autodiff_reverse(bar, Active, Active)] fn foo(x: f32) -> f32 { x * x } fn main() { |
