-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Rollup of 12 pull requests #152391
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 12 pull requests #152391
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
Example
---
```rust
fn main() {
match 92 {
x @ 0..30 $0if x % 3 == 0 => false,
x @ 0..30 if x % 2 == 0 => true,
_ => false
}
}
```
**Before this PR**
```rust
fn main() {
match 92 {
x @ 0..30 => if x % 3 == 0 {
false
},
x @ 0..30 if x % 2 == 0 => true,
_ => false
}
}
```
**After this PR**
```rust
fn main() {
match 92 {
x @ 0..30 => if x % 3 == 0 {
false
} else if x % 2 == 0 {
true
},
_ => false
}
}
```
The derived `T: Copy` constraint is not appropriate for an iterator by reference, but we generally do not want `Copy` on iterators anyway.
This implementation doesn't need the derived `T: Clone`.
Easy to input other patterns, or bind variable in let-chain
Example
---
```rust
fn main() {
let bar = 2;
if bar.$0
}
```
**Before this PR**
No complete 'let'
**After this PR**
```rust
fn main() {
let bar = 2;
if let $1 = bar
}
```
fix: Fix more glob issues
Remove outdated SyntaxErrorKind FIXME comment
And refactor the mechanism to be more maintainable.
CargoCheckMessage and CargoCheckParser were misleading, because they could apply to any tool that emits diagnostics. For example, it may be rustc directly rather than via cargo. Clarify this in the names. This is most noticeable when working on custom check commands in rust-project.json.
PR rust-lang#18043 changed flycheck to be scoped to the relevant package. This broke projects using check commands that invoke rustc directly, because diagnostic JSON from rustc doesn't contain the package ID. This was visible in the rust-analyzer logs when RA_LOG is set to `rust_analyzer::flycheck=trace`. Before: 2026-02-02T07:03:48.020184937-08:00 TRACE diagnostic received flycheck_id=0 mismatched types package_id=None scope=Workspace ... 2026-02-02T07:03:55.082046488-08:00 TRACE clearing diagnostics flycheck_id=0 scope=Workspace After: 2026-02-02T07:14:32.760707785-08:00 TRACE diagnostic received flycheck_id=0 mismatched types package_id=None scope=Package { package: BuildInfo { label: "fbcode//rust_devx/rust-guess-deps:rust-guess-deps" }, workspace_deps: Some({}) } ... 2026-02-02T07:14:48.355981415-08:00 TRACE clearing diagnostics flycheck_id=0 scope=Package { package: BuildInfo { label: "fbcode//rust_devx/rust-guess-deps:rust-guess-deps" }, workspace_deps: Some({}) } Previously r-a assumed that a diagnostic without a package ID applied to the whole workspace. We would insert the diagnostic at the workspace level, but then only clear diagnostics for the package. As a result, red squiggles would get 'stuck'. Users who had fixed compilation issues would still see the old red squiggles until they introduced a new compilation error. Instead, always apply diagnostics to the current package if flycheck is scoped to a package and the diagnostic doesn't specify a package. This makes CargoCheckEvent(None) and CargoCheckEvent(Some(_)) more consistent, as they now both match on scope.
Since we can't read the real file size.
Implement the new homogeneous & heterogeneous try blocks
…date minor: Remove unnecessary `unsafe(non_update_types)`
feat: fallback let postfix completions in condition
Support else-branch for move_guard
The usage of normal `display()` caused it to emit `{unknown}` which then failed to parse in `make::ty()`.
Really we should not use stringly-typed things here, but that's a change for another day.
Have a separate query for it.
…enkov Fix an ICE in the vtable iteration for a trait reference in const eval when a supertrait not implemented compiler/rustc_trait_selection/src/traits/vtable.rs@`vtable_entries`: The impossible predicates check in `vtable_entries` used `instantiate_own` which only includes the method's own `where` clauses, without the parent trait's bounds. Replace it with `instantiate_and_check_impossible_predicates` which also checks the trait ref itself, so unsatisfied supertrait bounds are caught and the method is marked `Vacant` instead of ICEing. Closes rust-lang#137190. Closes rust-lang#135470.
std: introduce path normalize methods at top of `std::path` Closes rust-lang#142931 Mention other methods that call `conponents` and `canonicalize` that fully normalize path. And fix two typo. r? libs
…ait_impls, r=tgross35 Add some conversion trait impls - `impl<T, const N: usize> From<[MaybeUninit<T>; N]> for MaybeUninit<[T; N]>` (cc rust-lang#96097) - `impl<T, const N: usize> AsRef<[MaybeUninit<T>; N]> for MaybeUninit<[T; N]>` (cc rust-lang#96097) - `impl<T, const N: usize> AsRef<[MaybeUninit<T>]> for MaybeUninit<[T; N]>` (cc rust-lang#96097) - `impl<T, const N: usize> AsMut<[MaybeUninit<T>; N]> for MaybeUninit<[T; N]>` (cc rust-lang#96097) - `impl<T, const N: usize> AsMut<[MaybeUninit<T>]> for MaybeUninit<[T; N]>` (cc rust-lang#96097) - `impl<T, const N: usize> From<MaybeUninit<[T; N]>> for [MaybeUninit<T>; N]` (cc rust-lang#96097) - `impl<T, const N: usize> AsRef<[Cell<T>; N]> for Cell<[T; N]>` (equivalent of `as_array_of_cells`, cc rust-lang#88248) - `impl<T, const N: usize> AsRef<[Cell<T>]> for Cell<[T; N]>` - `impl<T> AsRef<[Cell<T>]> for Cell<[T]>` (equivalent of `as_slice_of_cells`) @rustbot label T-libs-api needs-fcp -T-libs I’ve tried to only add impls that are unlikely to cause single-applicable-impl inference breakage.
…nkov typeck: Make it clearer that `check_pat_lit` only handles literal patterns Nowadays, the `hir::PatExprKind` enum guarantees that “expressions” in patterns can only be paths or literals. `PatExprKind::Path` is already handled by the previous match arm, so we can make this match arm explicitly match on `PatExprKind::Lit` without losing exhaustiveness. There should be no actual change to compiler behaviour.
Port rustc_no_implicit_bounds attribute to parser. Tracking Issue: rust-lang#131229 r? @JonathanBrouwer
…es-ready, r=lcnr Check stalled coroutine obligations eagerly Fixes rust-lang#151322 Fixes rust-lang#151323 Fixes rust-lang#137916 Fixes rust-lang#138274 The problem is that stalled coroutine obligations can't be satisifed so that they cause normalization to fail in `mir_borrowck`. Thus, we failed to register any opaque to storage in the next solver. I fix it by checking these obligations earlier in `mir_borrowck`. r? @lcnr
…ercote Rename the query system's `JobOwner` to `ActiveJobGuard`, and include `key_hash` `JobOwner` appears to have had more responsibilities in the past, but nowadays it's just a stack-guard object used by `execute_job` to poison the query state for the current key if some inner part of query execution panics. The new name and comments should hopefully be clearer about its (limited) role. I have also included a follow-up change that stores both the key and its previously-computed hash in the guard, instead of just the key. This avoids having to pass the key to `complete`, and avoids having to recompute the hash in `drop`. r? nnethercote (or compiler)
Contributor
Author
|
@bors r+ rollup=never p=5 |
Contributor
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Contributor
|
PR #150688, which is a member of this rollup, was unapproved. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-attributes
Area: Attributes (`#[…]`, `#![…]`)
A-compiletest
Area: The compiletest test runner
A-query-system
Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html)
A-run-make
Area: port run-make Makefiles to rmake.rs
A-testsuite
Area: The testsuite used to check the correctness of rustc
rollup
A PR which is a rollup
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
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-rust-analyzer
Relevant to the rust-analyzer team, which will review and decide on the PR/issue.
WG-trait-system-refactor
The Rustc Trait System Refactor Initiative (-Znext-solver)
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:
rust-analyzersubtree update #152388 (rust-analyzersubtree update)ArrayWindowstrait impls withWindows#151613 (AlignArrayWindowstrait impls withWindows)proc_macro::bridge#152166 (cleanup some more things inproc_macro::bridge)-Zunstable-optionsfor json targets #152236 (compiletest:-Zunstable-optionsfor json targets)std::path#142957 (std: introduce path normalize methods at top ofstd::path)check_pat_litonly handles literal patterns #150688 (typeck: Make it clearer thatcheck_pat_litonly handles literal patterns)JobOwnertoActiveJobGuard, and includekey_hash#152377 (Rename the query system'sJobOwnertoActiveJobGuard, and includekey_hash)r? @ghost
Create a similar rollup