-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Rollup of 6 pull requests #151762
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 6 pull requests #151762
+7,276
−2,239
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
Fix not applicable in statement when exist else block
Example
---
```rust
fn main() {
some_statements();
if$0 let Ok(x) = Err(92) {
foo(x);
} else {
return;
}
some_statements();
}
```
**Before this PR**
Assist not applicable
**After this PR**
```rust
fn main() {
some_statements();
let Ok(x) = Err(92) else {
return;
};
foo(x);
some_statements();
}
```
Add proper line/column resolution for proc-macro spans via a callback mechanism. Previously these methods returned hardcoded 1 values. The implementation adds: - SubRequest::LineColumn and SubResponse::LineColumnResult to the bidirectional protocol - ProcMacroClientInterface::line_column() method - Callback handling in load-cargo using LineIndex - Server implementation in RaSpanServer that uses the callback - a test for Span::line() and Span::column() in proc-macro server Add fn_like_span_line_column test proc-macro that exercises the new line/column API, and a corresponding test with a mock callback.
Implement Span::line() and Span::column() for proc-macro server
perf: Re-use scratch allocations for `try_evaluate_obligations`
Example
---
```rust
fn main() {
let cond = true;
match 92 {
3 => true,
x if cond => if x $0> 10 {
false
} else if x > 5 {
true
} else if x > 4 || x < -2 {
false
} else {
true
},
}
}
```
**Before this PR**
```rust
fn main() {
let cond = true;
match 92 {
3 => true,
x if x > 10 => false,
x if x > 5 => true,
x if x > 4 || x < -2 => false,
x => true,
}
}
```
**After this PR**
```rust
fn main() {
let cond = true;
match 92 {
3 => true,
x if cond && x > 10 => false,
x if cond && x > 5 => true,
x if cond && (x > 4 || x < -2) => false,
x if cond => true,
}
}
```
fix: Suggest traits other than ones in the environment crate
Needed to support flychecking in a later diff
Needed for all_workspace_dependencies_for_package implementation.
This exited the whole loop instead of having continue semantics and continuing to find workspaces. So wrap in find_map.
You should be able to flycheck a ProjectJson crate based on its build label. This paves the way for that. Context: I don't think this has been working for some time. It used to be that we would use cargo to build ProjectJson crates. Support for ProjectJson seems to have been somewhat steamrolled in PR 18845 (e4bf6e1bc36e4cbc8a36d7911788176eb9fac76e).
We need to distinguish from RunnableKind::Check, which is human-readable.
This adds a substitution helper to get the right behaviour re {label} and $saved_file.
… rust-project.json
This requires us to add $saved_file / {saved_file} interpolation back to restart_for_package.
Otherwise we break existing users of $saved_file. No grand reason why we can't delete saved_file
later, although I would just leave it because sometimes a build system might really know better
which target(s) to build, including multiple targets.
…run in a notification
…roject.json runnable For JSON / override users, pretty-print the custom flycheck command with fewer quote characters Better debug logging in flycheck
Because (1) it is what we use when there is no relevant config
(2) we automatically use either rust-project.json's flycheck, or cargo
This also puts check_command config into CargoOptions. It's a cargo option, after all.
It was pretty useless without this.
Previously:
Parsing target pattern `{label}`
Caused by:
Invalid target name `{label}`. (...)
Build ID: 6dab5942-d81c-4430-83b0-5ba523999050
Network: Up: 0B Down: 0B
Command: run.
Time elapsed: 0.3s
BUILD FAILED
* The terminal process "buck2 'run', '{label}'" terminated with exit code: 3.
rust-project requires {arg} these days. No good giving people bad information
even if it's not crucial to documenting this.
I am not familiar with this code at allso just doing what I can to unblock.
`rust-analyzer` subtree update Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@40cda2f. Created using https://github.com/rust-lang/josh-sync. r? @ghost
…-obk offload: move (un)register lib into global_ctors Right now we initialize the openmp/offload runtime before every single offload call, and tear it down directly afterwards. What we should rather do is initialize it once in the binary startup code, and tear it down at the end of the binary execution. Here I implement these changes. Together, our generated IR has a lot less usage of globals, which in turn simplifies the refactoring in rust-lang#150683, where I introduce a new variant of our offload intrinsic. r? oli-obk
Add some clarifications and fixes for fmt syntax This tries to clarify a few things regarding fmt syntax: - The comment on `Parser::word` seems to be wrong, as that underscore-prefixed words are just fine. This was changed in rust-lang#66847. - I struggled to follow the description of the width argument. It referred to a "second argument", but I don't know what second argument it is referring to (which is the first?). Either way, I rewrote the paragraph to try to be a little more explicit, and to use shorter sentences. - The description of the precision argument wasn't really clear about the distinction of an Nth argument and a named argument. I added a sentence to try to emphasize the difference. - `IDENTIFIER_OR_KEYWORD` was changed recently in rust-lang/reference#2049 to include bare `_`. But fmt named arguments are not allowed to be a bare `_`.
compiler: Rename several types/traits for per-query vtables - Follow-up to rust-lang#151577 --- This is another round of renaming for some subtle types and traits used by the query system, to hopefully make them easier to understand. Key renames: - struct `DynamicQuery` → `QueryVTable` (the actual vtable-like structure) - struct `DynamicQueries` → `PerQueryVTables` (holds a vtable for each query) - trait `QueryConfig` → `QueryDispatcher` - (used by generic functions in `rustc_query_system` to interact with query vtables) - struct `DynamicConfig` → `SemiDynamicQueryDispatcher` - (implements `QueryDispatcher` by combining a vtable with some compile-time boolean flags for improved perf) - trait `QueryConfigRestored` → `UnerasedQueryDispatcher` - (provides a `QueryDispatcher` while also remembering the query's unerased value type; allows some per-query code to be moved out of macros and into generic functions) This was trickier than `DepKindVTable`, because there are more types and traits involved, and it's harder to come up with distinctive and useful names for all of them. There should be no change to compiler behaviour. r? Kivooeo (or compiler)
Add `extern crate core` to diagnostic tests We do this to solve the `failed to resolve: you might be missing crate core` messages that were previously visible in the stderr. We also split off `subdiagnostic-derive-2` from the main `subdiagnostic-derive`, because the error for this test is now generated post-expansion.
…est, r=GuillaumeGomez Update `browser-ui-test` version to `0.23.3` Should fix rust-lang#151704 (comment). Should help with rust-lang#93784. r? ghost
Member
Author
|
@bors r+ rollup=never p=5 |
Contributor
This comment has been minimized.
This comment has been minimized.
rust-bors bot
pushed a commit
that referenced
this pull request
Jan 27, 2026
Rollup of 6 pull requests Successful merges: - #151751 (`rust-analyzer` subtree update) - #150893 (offload: move (un)register lib into global_ctors) - #151013 (Add some clarifications and fixes for fmt syntax) - #151666 (compiler: Rename several types/traits for per-query vtables) - #151738 (Add `extern crate core` to diagnostic tests) - #151759 (Update `browser-ui-test` version to `0.23.3`)
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Contributor
|
💔 Test for 88a25c5 failed: CI. Failed job:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-LLVM
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
A-query-system
Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html)
rollup
A PR which is a rollup
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.
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 #151751 (rust-analyzersubtree update)extern crate coreto diagnostic tests #151738 (Addextern crate coreto diagnostic tests)browser-ui-testversion to0.23.3#151759 (Updatebrowser-ui-testversion to0.23.3)r? @ghost
Create a similar rollup