Migrate #[autodiff] and #[rustc_autodiff] to the new attribute parser. #137774
Labels
A-attributes
Area: Attributes (`#[…]`, `#![…]`)
A-docs
Area: Documentation for any part of the project, including the compiler, standard library, and tools
C-cleanup
Category: PRs that clean code up or issues documenting cleanup.
F-autodiff
`#![feature(autodiff)]`
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Location
I think the author wants to add info to the rustc dev guide.
Summary
Hi @jdonszelmann,
first of all, thanks for the attribute refactor work and congrats on landing your big pr!
I recently introduced an
#[autodiff]
macro which can be applied on top of a function, and generates a second function. Both of the function then automatically receive a#[rustc_autodiff]
attribute.On of the two rustc_autodiff attributes, as well as the original autodiff macro take user arguments, so there is some duplicated parsing and verification. I'd like to move over to the new infra, and since a few people offered to help with autodiff, I thought this might be a nice opportunity to introduce them to it.
For reference, this was the original autodiff frontend PR: #129458
As a dummy example:
would expand to:
I think you haven't yet completed your plan to write a migration guide for the rustc-dev-guide, but do you have a migration PR that you can recommend to us as a blueprint to see how this could be done? Also, I don't know too much about your rework. Do you think the migration is going to end up as one big PR, or is it possible to split the work up?
The text was updated successfully, but these errors were encountered: