Skip to content

Rollup of 10 pull requests#155064

Closed
JonathanBrouwer wants to merge 232 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-QFDWw99
Closed

Rollup of 10 pull requests#155064
JonathanBrouwer wants to merge 232 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-QFDWw99

Conversation

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

asukaminato0721 and others added 30 commits December 23, 2025 01:25
fix test

clippy
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.
This updates the rust-version file to 80ad557.
…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
@rust-bors rust-bors bot added the rollup A PR which is a rollup label Apr 9, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) 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) PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler 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. labels Apr 9, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors r+ rollup=never p=5

Trying commonly failed jobs
@bors try jobs=dist-various-1,test-various,x86_64-gnu-aux,x86_64-gnu-llvm-21-3,x86_64-msvc-1,aarch64-apple,x86_64-mingw-1

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 9, 2026

📌 Commit b52fdca has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 9, 2026
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
@rust-bors

This comment has been minimized.

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 9, 2026

☀️ Try build successful (CI)
Build commit: a3e4896 (a3e489657e6f6cba70720b001375829d0e51844c, parent: a87c9b96031d4d8698bb0cd6533e83bc6d77ddaa)

@rust-bors rust-bors bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 10, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 10, 2026

☔ The latest upstream changes (presumably #155056) made this pull request unmergeable. Please resolve the merge conflicts.

This pull request was unapproved.

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) 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) PG-exploit-mitigations Project group: Exploit mitigations rollup A PR which is a rollup T-compiler Relevant to the compiler 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.