Repository navigation
Rollup of 4 pull requests - #166580
Closed
clarfonthey wants to merge 19 commits into
Closed
Rollup of 4 pull requests#166580clarfonthey wants to merge 19 commits into
clarfonthey wants to merge 19 commits into
Conversation
When no field of a `Reborrow` type is reborrowed, borrowck borrows the whole source value instead. That fallback assumed the target type has exactly one lifetime and hit a `bug!` otherwise, even though `Reborrow` impls on types with several lifetimes are accepted. Borrow the source under each of the target's lifetimes instead. The one lifetime case is unchanged, and the source stays borrowed for as long as any of the target's lifetimes is live.
And stop accepting empty directive names & empty values (after the `:`).
…vision conditions
* Reject revision names that aren't a sequence of alphanumeric chars, `-` and `_`. * Reject conditional `revision` directives (e.g., `//@[r] revisions: q`).
…e_no_reborrowed_field, r=Dnreikronos borrowck: Fix Reborrow ICE on types with several lifetimes Fixes rust-lang#165653 The ICE comes from borrowck. When a Reborrow type has no field that actually gets reborrowed (no `&mut` and no other Reborrow type inside), borrowck borrows the whole value instead, and that code just assumed the type has one lifetime. Reborrow types can have more than one lifetime now, so something like the struct with `&'a &'b str` from the issue blew up right there. The fix is in that fallback. When nothing gets reborrowed, borrowck now borrows the whole value once for each lifetime of the target type instead of panicking. With one lifetime it does exactly what it did before. With more it keeps the value borrowed while any of them is still alive, so two live reborrows of a two lifetime marker still get the usual "borrowed as mutable more than once" error, and using them one after the other is fine, same as with one lifetime. The program from the issue now gets the same error its one lifetime version already gets, since it's reborrowing through a shared ref. I ran a bunch of programs against a recent nightly. Nothing that compiles there stops compiling, the crashes are gone (generic fields, associated type fields, fields that are only Copy in some functions, CoerceShared targets with more lifetimes than the source all hit the same spot), and the ones that error now get the same error as their one lifetime version. Two things I didn't touch are the `&'static mut` field ICE (rust-lang#164933) and a CoerceShared panic when the source and target PhantomData fields don't match, that one also happens with one lifetime so it's a different bug. Honestly I think borrowing under every lifetime is the safe choice but maybe not the smartest one, a smarter version could work out which lifetime really matters for each field. If someone who knows the Reborrow design better has an opinion on that I'm happy to change it.
…ouxu compiletest: Further clean up directive parsing See individual commits for details. Follow-up to rust-lang#165576 and rust-lang#165483. Fixes rust-lang#123765. r? jieyouxu <sub>(No LLM was or will be used by me during the entire creation process of this PR)</sub>
…args, r=ZuseZ4 autodiff: don't ICE on invalid macro arguments Fixes rust-lang#150326 Fixes rust-lang#150327 Fixes rust-lang#150329 Fixes rust-lang#160329 The generated function name must now be a single identifier. Activities that aren't identifiers get the existing "did not recognize Activity" error. A function with a return type but no activities gets the existing activity count error, and expansion stops there. In rust-lang#160329, parser recovery leaves the function with more parameters than activities. That case now stops at the count error, so its crash test moves to `tests/ui/autodiff`.
…xed-slice, r=clarfonthey remove `Box::into_boxed_slice` This removes the implementation of `Box::into_boxed_slice` as discussed in https://github.com/issues/recent?issue=rust-lang%7Crust%7C71582&issue_global_id=MDU6SXNzdWU2MDcwMDMxNzc%3D
Contributor
Author
Contributor
Contributor
|
⌛ Trying commit 41cd6c2 with merge 0cf4627… To cancel the try build, run the command Workflow: https://github.com/rust-lang/rust/actions/runs/45745439718 |
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 26, 2026
Rollup of 4 pull requests try-job: dist-various-1 try-job: dist-various-2 try-job: test-various try-job: test-x86_64-gnu-aux try-job: test-x86_64-msvc-1 try-job: test-aarch64-apple-1 try-job: test-aarch64-apple-2 try-job: test-x86_64-mingw-1 try-job: test-i686-msvc try-job: test-armhf-gnu try-job: test-x86_64-gnu-llvm-22-3 try-job: test-aarch64-msvc-2
This comment has been minimized.
This comment has been minimized.
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Contributor
|
💔 Test for 679caf7 failed: CI. Failed job:
|
Contributor
Author
|
@bors try cancel |
Contributor
|
Try build cancelled. Cancelled workflows: Hint: if you want to run another try build, you do not need to manually cancel the previous one. Just run |
Member
|
Probably spurious |
Contributor
|
This pull request was unapproved due to being closed. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
Box::into_boxed_slice#166556 (removeBox::into_boxed_slice)r? @ghost
Create a similar rollup