Skip to content

Introduce Unnormalized wrapper#155083

Merged
rust-bors[bot] merged 3 commits intorust-lang:mainfrom
adwinwhite:introduce-unnormalized
Apr 19, 2026
Merged

Introduce Unnormalized wrapper#155083
rust-bors[bot] merged 3 commits intorust-lang:mainfrom
adwinwhite:introduce-unnormalized

Conversation

@adwinwhite
Copy link
Copy Markdown
Contributor

@adwinwhite adwinwhite commented Apr 10, 2026

View all comments

This is the first step of the eager normalization series.

This PR introduce an Unnormalized wrapper and make most normalization routines consume it. The purpose is to make normalization explicit.
This PR contains no behavior change.

API changes are in the first two commit.
There're some normalization routines left untouched:

  • normalize in the type checker of borrowck: better do it together with field.ty() returning Unnormalized.
  • normalize_with_depth: only used inside the old solver. Can be done later.
  • query_normalize: rarely used.
  • misc local normalization helpers.

The compiler errors are mostly fixed via ast-grep, with exceptions handled manually.

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Apr 10, 2026
@adwinwhite
Copy link
Copy Markdown
Contributor Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Apr 10, 2026
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Apr 10, 2026
@rust-log-analyzer

This comment has been minimized.

@adwinwhite
Copy link
Copy Markdown
Contributor Author

@bors try cancel

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 10, 2026

Try build cancelled. Cancelled workflows:

@rustbot rustbot added the T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. label Apr 10, 2026
@adwinwhite adwinwhite force-pushed the introduce-unnormalized branch from 309b0de to a616210 Compare April 10, 2026 07:51
@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot added the T-clippy Relevant to the Clippy team. label Apr 10, 2026
@adwinwhite
Copy link
Copy Markdown
Contributor Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Apr 10, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 10, 2026

☀️ Try build successful (CI)
Build commit: 10d0ef4 (10d0ef4e7995ca1d162f402be9f0b39b15d7a78a, parent: 7659cec4ed1457bc0d1f636127e66e8fe5008928)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (10d0ef4): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

Results (primary -2.4%, secondary -6.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.4% [-2.4%, -2.4%] 1
Improvements ✅
(secondary)
-6.4% [-6.4%, -6.4%] 1
All ❌✅ (primary) -2.4% [-2.4%, -2.4%] 1

Cycles

Results (secondary -0.7%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.4% [2.1%, 2.7%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.7% [-3.8%, -3.6%] 2
All ❌✅ (primary) - - 0

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 492.281s -> 489.321s (-0.60%)
Artifact size: 395.57 MiB -> 395.56 MiB (-0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Apr 10, 2026
@adwinwhite adwinwhite force-pushed the introduce-unnormalized branch from 3b64c2b to 5407a88 Compare April 10, 2026 13:37
@adwinwhite
Copy link
Copy Markdown
Contributor Author

r? @lcnr

Copy link
Copy Markdown
Contributor

@lcnr lcnr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

final nit pls cleanup commit history, then r=me

View changes since this review

Comment thread compiler/rustc_lint/src/multiple_supertrait_upcastable.rs
@lcnr
Copy link
Copy Markdown
Contributor

lcnr commented Apr 17, 2026

@bors rollup=never

@adwinwhite
Copy link
Copy Markdown
Contributor Author

adwinwhite commented Apr 17, 2026

final nit pls cleanup commit history

Should I just squash or isolate the API change in one commit for this big PR?

Also unsure why I can't reply to single inline review. If you missed it,
skip_norm_wip after explicit_super_predicates_of is unavoidable.
See comment

@rust-bors

This comment has been minimized.

@lcnr
Copy link
Copy Markdown
Contributor

lcnr commented Apr 17, 2026

Should I just squash or isolate the API change in one commit for this big PR?

whatever u prefer, as long as the "address review" commits are gone :3

@lcnr
Copy link
Copy Markdown
Contributor

lcnr commented Apr 17, 2026

r=me

@adwinwhite adwinwhite force-pushed the introduce-unnormalized branch from c894a60 to a73a9c7 Compare April 17, 2026 17:41
@rustbot

This comment has been minimized.

@adwinwhite
Copy link
Copy Markdown
Contributor Author

@bors r=lcnr

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 17, 2026

📌 Commit a73a9c7 has been approved by lcnr

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. 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-review Status: Awaiting review from the assignee but also interested parties. labels Apr 17, 2026
@rust-bors

This comment has been minimized.

@rust-bors rust-bors bot removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Apr 18, 2026
@adwinwhite adwinwhite force-pushed the introduce-unnormalized branch from a73a9c7 to 6279106 Compare April 19, 2026 16:20
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 19, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@adwinwhite
Copy link
Copy Markdown
Contributor Author

Increase priority to avoid repeated merge conflict.

@bors r=lcnr p=1

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 19, 2026

📌 Commit 6279106 has been approved by lcnr

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 19, 2026
@rust-bors

This comment has been minimized.

@rust-bors rust-bors bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 19, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 19, 2026

☀️ Test successful - CI
Approved by: lcnr
Duration: 3h 19m 8s
Pushing e22c616 to main...

@rust-bors rust-bors bot merged commit e22c616 into rust-lang:main Apr 19, 2026
12 checks passed
@rustbot rustbot added this to the 1.97.0 milestone Apr 19, 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. I-types-nominated Nominated for discussion during a types team meeting. merged-by-bors This PR was explicitly merged by bors. PG-exploit-mitigations Project group: Exploit mitigations T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants