Rollup of 10 pull requests#155064
Closed
JonathanBrouwer wants to merge 232 commits intorust-lang:mainfrom
Closed
Conversation
fix rust-lang/rust-analyzer#18578 I believe it won't break anything.
Example
---
```rust
trait Foo {
fn f(&self) -> i32;
fn foo(&self) -> i32 {
$0self.f()+self.f()$0
}
}
```
**Before this PR**
```rust
trait Foo {
fn f(&self) -> i32;
fn foo(&self) -> i32 {
fun_name(self)
}
}
fn $0fun_name(&self) -> i32 {
self.f()+self.f()
}
```
**After this PR**
```rust
trait Foo {
fn f(&self) -> i32;
fn foo(&self) -> i32 {
fun_name(self)
}
}
fn $0fun_name(this: &impl Foo) -> i32 {
this.f()+this.f()
}
```
We can't use the flycheck scope, because that value varies depending on how the flycheck was triggered. See also rust-lang/rust-analyzer#21571, which was reverted due to issues with scope. Instead, treat empty diagnostics as a flycheck for the entire workspace, add comments explaining the JSON diagnostic format, and add an integration test.
Example
---
```rust
trait Marker {
fn foo();
fn baz();
}
impl Marker for Foo {
fn foo() {}
fn missing() {}$0
fn baz() {}
}
```
**Before this PR**
```rust
trait Marker {
fn missing();
fn foo();
fn baz();
}
impl Marker for Foo {
fn foo() {}
fn missing() {}
fn baz() {}
}
```
**After this PR**
```rust
trait Marker {
fn foo();
fn missing();
fn baz();
}
impl Marker for Foo {
fn foo() {}
fn missing() {}
fn baz() {}
}
```
Example
---
```rust
struct Other;
struct String;
enum Foo {
String($0)
}
```
**Before this PR**
```text
en Foo Foo []
st Other Other []
sp Self Foo []
st String String []
```
**After this PR**
```text
st String String [name]
en Foo Foo []
st Other Other []
sp Self Foo []
```
Example
---
```rust
fn main() {
println!("{}", env!("CA$0"));
}
```
**Before this PR**
Cannot complete any env
**After this PR**
```rust
fn main() {
println!("{}", env!("CARGO_BIN_NAME"));
}
```
Example
---
Like `is_foo`, `.not`, `.if`
```rust
fn main() {
let is_foo = true;
!is_foo.$0
}
```
**Before this PR**
```rust
fn main() {
let is_foo = true;
!if is_foo {
$0
}
}
```
**After this PR**
```rust
fn main() {
let is_foo = true;
if !is_foo {
$0
}
}
```
Why? Because sometimes we work on resolving some bug that causes hang/consistent panics/stack overflows/etc., and we put it in a fixture for a test. Then r-a does exactly the same to us, and it's really hard to work this way.
feat: Allow disabling all fixture support
This updates the rust-version file to 80ad557.
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: rust-lang/rust@80ad557 Filtered ref: rust-lang/rust-analyzer@7f4e321 Upstream diff: rust-lang/rust@1174f78...80ad557 This merge was created using https://github.com/rust-lang/josh-sync.
Rustc pull update
…hims These branches reused the libc::write error string when arguments were absent. Assisted by an AI coding tool (see CONTRIBUTING.md). Signed-off-by: Weixie Cui <cuiweixie@gmail.com>
…ng-args-messages fix: Correct missing-args messages for sched_getaffinity and getenv shims
For assist 'convert_to_guarded_return'
Example
---
```rust
fn main() -> i32 {
if$0 true {
foo();
} else {
bar()
}
}
```
**Before this PR**
Assist not applicable
**After this PR**
```rust
fn main() -> i32 {
if false {
return bar();
}
foo();
}
```
`rust-analyzer` subtree update Subtree update of `rust-analyzer` to rust-lang/rust-analyzer@64ddb54. Created using https://github.com/rust-lang/josh-sync. r? @ghost
…r=jdonszelmann,mejrs Introduce a `#[diagnostic::on_unknown]` attribute This PR introduces a `#[diagnostic::on_unknown]` attribute that allows crate authors to customize the error messages emitted by unresolved imports. The main usecase for this is using this attribute as part of a proc macro that expects a certain external module structure to exist or certain dependencies to be there. For me personally the motivating use-case are several derives in diesel, that expect to refer to a `tabe` module. That is done either implicitly (via the name of the type with the derive) or explicitly by the user. This attribute would allow us to improve the error message in both cases: * For the implicit case we could explicity call out our assumptions (turning the name into lower case, adding an `s` in the end) + point to the explicit variant as alternative * For the explicit variant we would add additional notes to tell the user why this is happening and what they should look for to fix the problem (be more explicit about certain diesel specific assumptions of the module structure) I assume that similar use-cases exist for other proc-macros as well, therefore I decided to put in the work implementing this new attribute. I would also assume that this is likely not useful for std-lib internal usage. related rust-lang#152900 and rust-lang#128674
Break a single query cycle in the deadlock handler This simplifies the query cycle handling by only breaking a single query cycle each time the deadlock handler is called.
Implement `GenericTypeVisitable` for some types This is required for rust-analyzer. r? types
Fix linker error by resolving regions for main return type obligations This PR fix linker error by resolving regions for main return type obligations as discussed in rust-lang#148421 Added a final check . Now the compiler double-checks the lifetimes for main right away. If they don't work it stops and gives the user a clean compiler error instead of a linker crash. Fixes rust-lang#148421.
…davidtwco hwaddress: automatically add `-Ctarget-feature=+tagged-globals` Note that since HWAddressSanitizer is/should be a target modifier, we do not have to worry about whether this LLVM target feature changes the ABI. Fixes: rust-lang#148185
…O8Ki Add myself as co-maintainer for hexagon-unknown-linux-musl Two dedicated target maintainers are needed for tier 2 promotion. Coordinated with the existing maintainer r? @androm3da.
…3899, r=Kivooeo Add tests for three fixed issues (an LLVM crash, an ICE and poor codegen) Closes rust-lang#104037. Closes rust-lang#112623. Closes rust-lang#113899.
…thanBrouwer minor follow up to removing soft mode `#[unstable]` Follow up to rust-lang#153622 r? JonathanBrouwer
…adwinwhite Fix if branch in op.rs I removed the if guard without thinking in rust-lang#154223. Really sorry about this. r? @hkBst
Contributor
Author
Contributor
rust-bors bot
pushed a commit
that referenced
this pull request
Apr 9, 2026
Rollup of 10 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
This comment has been minimized.
This comment has been minimized.
Contributor
Contributor
|
☔ The latest upstream changes (presumably #155056) made this pull request unmergeable. Please resolve the merge conflicts. This pull request was unapproved. |
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:
rust-analyzersubtree update #155046 (rust-analyzersubtree update)#[diagnostic::on_unknown]attribute #152901 (Introduce a#[diagnostic::on_unknown]attribute)GenericTypeVisitablefor some types #155034 (ImplementGenericTypeVisitablefor some types)-Ctarget-feature=+tagged-globals#154677 (hwaddress: automatically add-Ctarget-feature=+tagged-globals)#[unstable]#155039 (minor follow up to removing soft mode#[unstable])r? @ghost
Create a similar rollup