-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 4 pull requests #139460
Closed
Closed
Rollup of 4 pull requests #139460
+344
−217
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…nifyValue imports non-nightly
- fix errors caused by the move of `ast::Item::ident` (see rust-lang#138740) - move the logic of getting `sig`, `vis`, and `ident` from two seperate `match` statements into one (less repetition especially with the nested `match`)
Verify that the expanded `inline` and `rustc_autodiff` macros are not duplicated.
This can happen when invalid syntax is passed to a declarative macro. We shouldn't be too strict about the token stream position once the parser has rejected the invalid syntax. Fixes rust-lang#139248 and rust-lang#139445.
…ZuseZ4 fix usage of `autodiff` macro with inner functions This PR adds additional handling into the expansion step of the `std::autodiff` macro (in `compiler/rustc_builtin_macros/src/autodiff.rs`), which allows the macro to be applied to inner functions. ```rust #![feature(autodiff)] use std::autodiff::autodiff; fn main() { #[autodiff(d_inner, Forward, Dual, DualOnly)] fn inner(x: f32) -> f32 { x * x } } ``` Previously, the compiler didn't allow this due to only handling `Annotatable::Item` and `Annotatable::AssocItem` and missing the handling of `Annotatable::Stmt`. This resulted in the rather generic error ``` error: autodiff must be applied to function --> src/main.rs:6:5 | 6 | / fn inner(x: f32) -> f32 { 7 | | x * x 8 | | } | |_____^ error: could not compile `enzyme-test` (bin "enzyme-test") due to 1 previous error ``` This issue was originally reported [here](EnzymeAD#184). Quick question: would it make sense to add a ui test to ensure there is no regression on this? This is my first contribution, so I'm extra grateful for any piece of feedback!! :D r? `@oli-obk` Tracking issue for autodiff: rust-lang#124509
coverage: Deal with unused functions and their names in one place When coverage codegen creates dummy instances and covfun records for unused functions, we already know that they are unused, so we might as well set up the special array of unused function names at the same time. --- The first commit only moves code around; all significant changes are in the second commit. There should be no change in compiler output.
…nkov Allow for missing invisible close delim when reparsing an expression. This can happen when invalid syntax is passed to a declarative macro. We shouldn't be too strict about the token stream position once the parser has rejected the invalid syntax. Fixes rust-lang#139248. r? `@petrochenkov` --- try-job: test-various
…-new, r=lcnr Make the UnifyKey and UnifyValue imports non-nightly Explicitly depend on ena in rustc_type_ir and import types from there. This is required for rust-analyzer to use the new solver. r? types
@bors r+ rollup=never p=5 |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Apr 7, 2025
Rollup of 4 pull requests Successful merges: - rust-lang#138314 (fix usage of `autodiff` macro with inner functions) - rust-lang#138766 (coverage: Deal with unused functions and their names in one place) - rust-lang#139298 (Allow for missing invisible close delim when reparsing an expression.) - rust-lang#139426 (Make the UnifyKey and UnifyValue imports non-nightly) r? `@ghost` `@rustbot` modify labels: rollup
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
|
Given this, and the fact that this failed relatively early, I'm going to retry and cross my fingers: @bors retry |
Oh the queue already moved on to one of these PRs individually, so better to close. @bors r- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
rollup
A PR which is a rollup
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Successful merges:
autodiff
macro with inner functions #138314 (fix usage ofautodiff
macro with inner functions)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup