autodiff fails in impl blocks #139557
Labels
C-bug
Category: This is a bug.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
F-autodiff
`#![feature(autodiff)]`
I tried this code:
https://github.com/EnzymeAD/rustbook/blob/main/samples/tests/traits/mod.rs
I expected to see this happen: Passes the assertion
Instead, this happened:
Meta
rustc --version --verbose
:Backtrace
This is an easy bug and a got way to get started. It used to work a few weeks ago, so it's likely that just one of the other improvement PRs accidentally regressed this test, since it's not upstream yet. Supporting autodiff in impl blocks is of course important, so it would be nice to fix this regression.
To prevent further regressions, this autodiff invocation (under impl Volumentric for Ogden) should be added in
tests/pretty/autodiff
. We emit the error asdcx.emit_err(errors::AutoDiffInvalidApplication { span: item.span() });
incompiler/rustc_builtin_macros/src/autodiff.rs
so the bugfix likely goes there, this PR could be an inspiration: https://github.com/rust-lang/rust/pull/138314/filesTracking:
The text was updated successfully, but these errors were encountered: