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

@rust-bors rust-bors bot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label 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
@github-actions
Copy link
Copy Markdown
Contributor

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 38799a3 (parent) -> e22c616 (this PR)

Test differences

Show 370 test diffs

370 doctest diffs were found. These are ignored, as they are noisy.

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard e22c616e4e87914135c1db261a03e0437255335e --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. optional-x86_64-gnu-parallel-frontend: 1h 48m -> 2h 36m (+44.4%)
  2. i686-gnu-nopt-2: 1h 44m -> 2h 20m (+34.5%)
  3. x86_64-mingw-1: 3h 4m -> 2h 12m (-28.1%)
  4. dist-i686-msvc: 1h 52m -> 2h 21m (+26.2%)
  5. dist-x86_64-llvm-mingw: 1h 55m -> 1h 26m (-25.3%)
  6. x86_64-gnu-nopt: 2h 28m -> 1h 51m (-25.1%)
  7. x86_64-msvc-1: 2h 43m -> 2h 2m (-25.0%)
  8. x86_64-gnu-tools: 54m 45s -> 1h 3m (+15.7%)
  9. dist-s390x-linux: 1h 27m -> 1h 14m (-15.2%)
  10. x86_64-gnu-llvm-22-1: 1h 7m -> 1h 17m (+14.6%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (e22c616): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

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

Max RSS (memory usage)

Results (secondary -6.5%)

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)
- - 0
Improvements ✅
(secondary)
-6.5% [-6.5%, -6.5%] 1
All ❌✅ (primary) - - 0

Cycles

Results (secondary -3.6%)

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)
- - 0
Improvements ✅
(secondary)
-3.6% [-3.6%, -3.6%] 1
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 490.954s -> 507.073s (3.28%)
Artifact size: 394.29 MiB -> 394.31 MiB (0.00%)

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