Rollup of 9 pull requests#154983
Closed
JonathanBrouwer wants to merge 77 commits intorust-lang:mainfrom
Closed
Conversation
On targets with convergent operations, we need to add the convergent attribute to all functions that run convergent operations. Following clang, we can conservatively apply the attribute to all functions when compiling for such a target and rely on LLVM optimizing away the attribute in cases where it is not necessary. This affects the amdgpu and nvptx targets.
start paragraph with upper case
- Specifically guide new contributors that unit tests for `core` and `alloc` do not belong within those crates and instead belong in the `coretests` and `alloctests` crates. - Also add some information about which `lib.rs` file needs the unstable feature declarations
Update information about adding unit tests
fix a sentence regarding early bounds
Fix `rustc_hir::Crate` links
Add explanation of default flags for UI tests
add chapter on projection vs trait split
Explain how nested generic args are represented
projection vs trait bound split cleanup
Fix rustc-pull CI workflow
inline with the rename in PR rust-lang#115764
Change `ConstValue::ByRef` to `ConstValue::Indirect`
missing pause
sembr a few files
…hercote Use convergent attribute to funcs for GPU targets On targets with convergent operations, we need to add the convergent attribute to all functions that run convergent operations. Following clang, we can conservatively apply the attribute to all functions when compiling for such a target and rely on LLVM optimizing away the attribute in cases where it is not necessary. This affects the amdgpu and nvptx targets. cc @kjetilkjeka, @kulst for nvptx cc @ZuseZ4 r? @nnethercote, as you already reviewed this in the other PR Split out from rust-lang#149637, the part here should be uncontroversial.
constify DoubleEndedIterator The only functions that can't be constified are `advance_back_by` (requires const range or const-hack), `nth_back` (requires `advance_back_by`), and `rfind` (requires const closures). I've put it under `const_iter`, but I can open a separate tracking issue, though I think tracking all `Iterator` traits separately would be quite annoying, and we probably would prefer to constify them together anyway.
…nnethercote Replace span_look_ahead with span_followed_by While reviewing that PR rust-lang#154703 (comment), I found that magic number 100, let's remove it, and seems `span_followed_by` is a better name.
Don't store `pattern_ty` in `TestableCase` This field's only remaining use was in an assertion, but we can perform the same assertion earlier when constructing `TestableCase::Range`. --- For background, the `pattern_ty` field was introduced in rust-lang#136435 to replace a reference to the full THIR pattern node. Since then, most uses of `pattern_ty` were removed by rust-lang#150238.
…next-solver, r=TaKO8Ki Fix ICE in next-solver dyn-compatibility check The next solver treated error-containing dispatchability goals as proven and misclassified the trait as dyn compatible. Short-circuit receivers with type errors so object-method confirmation stays on the normal error path. Tracking issue: rust-lang#130516 Closes: rust-lang#151311
…r=Nadrieril Add getters for `rustc_pattern_analysis::constructor::Slice` fields rust-analyzer needs that. r? @Nadrieril
match exhaustiveness: Show the guard exhaustivity note only when it's the guards alone that cause non-exhaustiveness
Only show the "match arms with guards don't count towards exhaustivity" note when removing all guards would make the match exhaustive, but also in the cases when some arms don’t have guards. Previously, this note was shown whenever all arms had guards, but even if the patterns themselves were insufficient to cover all valid values of a type.
Do this by rerunning the exhaustiveness analysis with guards stripped to determine whether the guards are actually the cause of non-exhaustiveness. This only happens on an actual exhaustiveness error, so should not be a performance concern.
This will make a program like:
```rust
fn main() {
let some_condition = true;
let some_option: Option<u8> = None;
let _res = match some_option {
Some(val) if some_condition => val,
None => 0,
};
}
```
produce the note ”match arms with guards don't count towards exhaustivity” that previously would not have been appearing.
Closes rust-lang#104653 as I think this addresses the spirit of that issue. I don’t believe it’s necessary to be any more elaborate in the diagnostics here?
Use derived impl for `GappedRange` subdiagnostic
rustc-dev-guide subtree update Subtree update of `rustc-dev-guide` to rust-lang/rustc-dev-guide@912f6c6. Created using https://github.com/rust-lang/josh-sync. r? @ghost
Contributor
Author
Contributor
Contributor
|
⌛ Trying commit 26d18b8 with merge 867de5e… To cancel the try build, run the command Workflow: https://github.com/rust-lang/rust/actions/runs/24130325729 |
rust-bors bot
pushed a commit
that referenced
this pull request
Apr 8, 2026
Rollup of 9 pull requests try-job: dist-various-1 try-job: test-various try-job: x86_64-gnu-aux try-job: x86_64-gnu-llvm-21-3 try-job: x86_64-msvc-1 try-job: aarch64-apple try-job: x86_64-mingw-1
Contributor
|
This pull request was unapproved due to being closed. |
Contributor
Author
|
@bors try cancel |
Contributor
|
Try build cancelled. Cancelled workflows: |
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:
pattern_tyinTestableCase#154879 (Don't storepattern_tyinTestableCase)rustc_pattern_analysis::constructor::Slicefields #154934 (Add getters forrustc_pattern_analysis::constructor::Slicefields)GappedRangesubdiagnostic #154961 (Use derived impl forGappedRangesubdiagnostic)r? @ghost
Create a similar rollup