Skip to content

Conversation

@matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost

Create a similar rollup

ShoyuVanilla and others added 10 commits January 16, 2026 00:35
Makes the use expressions significantly shorter.
Sometimes the middle frames of the ICE backtrace becomes `<unknown>` on
`i686-pc-windows-msvc` which then makes this test flaky.
THIR patterns: Always use type `str` for string-constant-value nodes

Historically, constants and literals of type `&str` have been represented in THIR patterns as `PatKind::Const` nodes with type `&str`.

That's fine for stable Rust, but `feature(deref_patterns)` also created a need to have string literal patterns of type `str` in some cases, which resulted in a number of additional special cases and inconsistencies in typechecking and in HIR-to-THIR-to-MIR lowering of patterns.

We can avoid several of those special cases by having THIR treat string-constant-values as fundamentally being of type `str`, and then using `PatKind::Deref` to represent the additional `&` layer in the common case where it is needed. This allows bare `str` patterns to require very little special treatment.

Existing tests should already do a good job of demonstrating that this implementation change does not affect the stable language.
fix: Do not delay E0107 when there exists an assoc ty with the same name

Fixes rust-lang#148121

When we have the following code:

```rust
trait Foo<T> {}

impl Foo<T: Default> for String {}
```

we delay `E0107: wrong number of generic args` to suggest moving `T: Default` bound to the impl block's param declaration.

The delay is determined by whether all the missing generic parameters are mentioned by those *wrong* assoc item constraints.

But this delay is wrong when there exist any *correct* assoc item constraints, i.e. when we have an assoc type whose identifier is same with a missing generic parameter like in the following code:

```rust
pub trait Super<X> {
    type X;
}
pub trait A {}
impl A for dyn Super<X = ()> {}
```
Use default field values in a few more cases

Makes the use expressions significantly shorter.
Disable `dump-ice-to-disk` on `i686-pc-windows-msvc`

Sometimes the middle frames of the ICE backtrace becomes `<unknown>` on `i686-pc-windows-msvc` which then makes this test flaky. Noticed in rust-lang#150925 (comment).

Originally expanded in rust-lang#142563 to see if it's still flaky for other `*-windows-*` targets, unfortunately the answer is yes for `i686-pc-windows-msvc` as well.

r? @dianqk (or compiler or anyone really)
@rust-bors rust-bors bot added the rollup A PR which is a rollup label Jan 16, 2026
@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs 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. labels Jan 16, 2026
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=5

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 16, 2026

📌 Commit 36d4a6d has been approved by matthiaskrgr

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 Jan 16, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 16, 2026

⌛ Testing commit 36d4a6d with merge 336efc6...

Workflow: https://github.com/rust-lang/rust/actions/runs/21057860975

rust-bors bot pushed a commit that referenced this pull request Jan 16, 2026
Rollup of 4 pull requests

Successful merges:

 - #151155 (THIR patterns: Always use type `str` for string-constant-value nodes)
 - #151166 (fix: Do not delay E0107 when there exists an assoc ty with the same name)
 - #151172 (Use default field values in a few more cases)
 - #151185 (Disable `dump-ice-to-disk` on `i686-pc-windows-msvc`)

r? @ghost
@jhpratt
Copy link
Member

jhpratt commented Jan 16, 2026

@bors r-

#151172 was just unapproved

@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 Jan 16, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 16, 2026

Commit 36d4a6d has been unapproved.

Auto build cancelled due to unapproval. Cancelled workflows:

@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 Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-run-make Area: port run-make Makefiles to rmake.rs rollup A PR which is a rollup T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants