-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Rollup of 8 pull requests #141672
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
Closed
Closed
Rollup of 8 pull requests #141672
Conversation
This file contains hidden or 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
Pending fix. ``` error: cannot find a built-in macro with name `autodiff_forward` --> library\core\src\macros\mod.rs:1542:5 | 1542 | / pub macro autodiff_forward($item:item) { 1543 | | /* compiler built-in */ 1544 | | } | |_____^ error: cannot find a built-in macro with name `autodiff_reverse` --> library\core\src\macros\mod.rs:1549:5 | 1549 | / pub macro autodiff_reverse($item:item) { 1550 | | /* compiler built-in */ 1551 | | } | |_____^ error: could not compile `core` (lib) due to 2 previous errors ```
UI tests are pending, will depend on error messages change.
…des (`Forward`, `Reverse`) Since the mode is no longer part of `meta_item`, we must insert it manually (otherwise macro expansion with `#[rustc_autodiff]` won't work). This can be revised later if a more structured representation becomes necessary (using enums, annotated structs, etc). Some tests are currently failing. I'll address them next.
Intrinsics are not real functions and as such don't have any calling convention. Trying to compute a calling convention for an intrinsic anyway is a nonsensical operation.
It's not needed, because `next` and `local` fields uniquely identify the drop. This is a ~2% speed win on the very large program in rust-lang#134404, and it's also a tiny bit simpler.
Because `Scope` also has a field named `drops`, and I found having two fields with the same name made this code harder to read.
This pattern of iterating over scopes and drops occurs multiple times in this file, with slight variations. All of them use `for` loops except this one. This commits changes it for consistency.
fixes rust-lang#91274 Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
…manieu Add data_ptr method to Mutex and RwLock Implementation of rust-lang#140368 / rust-lang/libs-team#531. I tried to write a useful safety section about when it is safe to read or write through the returned pointers, but couldn't come up with something nice. Hoping this PR is still useful without that. I'm happy to add any doc strings other people come up with if needed before merge, of course. Unresolved questions: - Return a `LockResult` or not? - Return `*mut T` like existing APIs (`Cell::as_ptr` / `MaybeUninit::as[_mut]_ptr` / `Vec::as_ptr` / ...) or be more precise and return `NonNull<T>`?
Split `autodiff` into `autodiff_forward` and `autodiff_reverse` This PR splits `#[autodiff]` macro so `#[autodiff(df, Reverse, args)]` would become `#[autodiff_reverse(df, args)]` and `#[autodiff(df, Forward, args)]` would become `#[autodiff_forwad(df, args)]`.
…n, r=davidtwco Improve intrinsic handling in cg_ssa * Move all intrinsic handling code to the start of `codegen_call_terminator`. * Push some intrinsic handling code into `codegen_intrinsic_call`. * Don't depend on FnAbi for intrinsics.
…r, r=petrochenkov Refactor the two-phase check for impls and impl items Refactor the two-phase dead code check to make the logic clearer and simpler: 1. adding assoc fn and impl into `unsolved_items` directly during the initial construction of the worklist 2. converge the logic of checking whether assoc fn and impl are used to `item_should_be_checked`, and the item is considered used only when its corresponding trait and Self adt are used This PR only refactors as much as possible to avoid affecting the original functions. However, due to the adjustment of the order of checks, the test results are slightly different, but overall, there is no regression problem Extracted from rust-lang#128637. r? petrochenkov
…ro-91274, r=GuillaumeGomez rustdoc: linking to a local proc macro no longer warns fixes rust-lang#91274 tried to keep the fix general in case we ever have any other kind of item that occupies multiple namespaces simultaniously.
@bors r+ rollup=never p=5 |
bors
added a commit
that referenced
this pull request
May 28, 2025
Rollup of 8 pull requests Successful merges: - #140369 (Add data_ptr method to Mutex and RwLock) - #140697 (Split `autodiff` into `autodiff_forward` and `autodiff_reverse`) - #141404 (Improve intrinsic handling in cg_ssa) - #141407 (Refactor the two-phase check for impls and impl items) - #141411 (rustdoc: linking to a local proc macro no longer warns) - #141548 (consider glob imports in cfg suggestion) - #141627 (Drop-build cleanups) - #141670 (Fix ICE in tokenstream with contracts from parser recovery) r? `@ghost` `@rustbot` modify labels: rollup
💔 Test failed - checks-actions |
@bors retry |
GH won't load the log for me to see what went wrong |
bors
added a commit
that referenced
this pull request
May 28, 2025
Rollup of 8 pull requests Successful merges: - #140369 (Add data_ptr method to Mutex and RwLock) - #140697 (Split `autodiff` into `autodiff_forward` and `autodiff_reverse`) - #141404 (Improve intrinsic handling in cg_ssa) - #141407 (Refactor the two-phase check for impls and impl items) - #141411 (rustdoc: linking to a local proc macro no longer warns) - #141548 (consider glob imports in cfg suggestion) - #141627 (Drop-build cleanups) - #141670 (Fix ICE in tokenstream with contracts from parser recovery) 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-attributes
Area: Attributes (`#[…]`, `#![…]`)
A-LLVM
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
rollup
A PR which is a rollup
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
T-rustdoc-frontend
Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
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
intoautodiff_forward
andautodiff_reverse
#140697 (Splitautodiff
intoautodiff_forward
andautodiff_reverse
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup