Skip to content

Do not eagerly normalize alias during coherence#157617

Merged
rust-bors[bot] merged 4 commits into
rust-lang:mainfrom
Shourya742:2026-06-08-donot-eagerly-normalize-alias-during-coherence
Jun 13, 2026
Merged

Do not eagerly normalize alias during coherence#157617
rust-bors[bot] merged 4 commits into
rust-lang:mainfrom
Shourya742:2026-06-08-donot-eagerly-normalize-alias-during-coherence

Conversation

@Shourya742

@Shourya742 Shourya742 commented Jun 8, 2026

Copy link
Copy Markdown
Member

@rustbot rustbot added 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) beta-nominated Nominated for backporting to the compiler in the beta channel. labels Jun 8, 2026
@rust-log-analyzer

This comment has been minimized.

@Shourya742

Shourya742 commented Jun 8, 2026

Copy link
Copy Markdown
Member Author

Moving this to draft

@Shourya742 Shourya742 marked this pull request as draft June 8, 2026 17:35
@rustbot rustbot 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-review Status: Awaiting review from the assignee but also interested parties. labels Jun 8, 2026
@Shourya742 Shourya742 force-pushed the 2026-06-08-donot-eagerly-normalize-alias-during-coherence branch 2 times, most recently from 7ef20cf to 51a1054 Compare June 9, 2026 08:34
@Shourya742 Shourya742 marked this pull request as ready for review June 9, 2026 08:44
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 9, 2026
Comment thread compiler/rustc_trait_selection/src/traits/coherence.rs Outdated
@Shourya742 Shourya742 force-pushed the 2026-06-08-donot-eagerly-normalize-alias-during-coherence branch from 51a1054 to 9fa30ac Compare June 9, 2026 12:28
@Shourya742 Shourya742 requested a review from lcnr June 9, 2026 13:59
Comment thread compiler/rustc_trait_selection/src/traits/coherence.rs Outdated
@lcnr lcnr changed the title Donot eagerly normalize alias during coherence Do not eagerly normalize alias during coherence Jun 10, 2026
@Shourya742 Shourya742 force-pushed the 2026-06-08-donot-eagerly-normalize-alias-during-coherence branch from 9fa30ac to 063fdc0 Compare June 11, 2026 01:02
@rustbot

rustbot commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

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.

@Shourya742

Copy link
Copy Markdown
Member Author

@bors r=@lcnr

@rust-bors

rust-bors Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

@Shourya742: 🔑 Insufficient privileges: not in review users

@lcnr

lcnr commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

@bors r+ rollup=never

@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 Jun 12, 2026
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

A job failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
  IMAGE: dist-x86_64-netbsd
##[endgroup]
    Updating crates.io index
error: failed to get `adler2` as a dependency of package `miniz_oxide v0.8.8`
    ... which satisfies dependency `miniz_oxide = "^0.8.5"` of package `flate2 v1.1.9`
    ... which satisfies dependency `flate2 = "^1.1.9"` of package `citool v0.1.0 (/home/runner/work/rust/rust/src/ci/citool)`

Caused by:
  failed to load source for dependency `adler2`

Caused by:
  unable to update registry `crates-io`

Caused by:
  download of ad/le/adler2 failed

Caused by:
  curl failed

Caused by:

@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 Jun 13, 2026
@rust-bors

rust-bors Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: lcnr
Duration: 3h 22m 6s
Pushing 4e391cf to main...

@rust-bors rust-bors Bot merged commit 4e391cf into rust-lang:main Jun 13, 2026
13 checks passed
@rustbot rustbot added this to the 1.98.0 milestone Jun 13, 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 6540795 (parent) -> 4e391cf (this PR)

Test differences

Show 5 test diffs

Stage 1

  • [ui] tests/ui/traits/next-solver/coherence/coherence-unknowable-does-not-eagerly-normalize.rs: [missing] -> pass (J1)
  • [ui (polonius)] tests/ui/traits/next-solver/coherence/coherence-unknowable-does-not-eagerly-normalize.rs: [missing] -> pass (J2)

Stage 2

  • [ui] tests/ui/traits/next-solver/coherence/coherence-unknowable-does-not-eagerly-normalize.rs: [missing] -> pass (J0)

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

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 4e391cf2425cf96521af17ff460e9f220e9bca00 --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. x86_64-msvc-ext3: 1h 4m -> 1h 52m (+73.0%)
  2. dist-aarch64-linux: 1h 48m -> 2h 38m (+46.7%)
  3. dist-riscv64-linux: 1h 30m -> 1h (-33.7%)
  4. dist-i686-linux: 1h 49m -> 1h 12m (-33.5%)
  5. dist-x86_64-mingw: 2h 4m -> 2h 38m (+26.6%)
  6. x86_64-msvc-ext1: 2h 24m -> 1h 48m (-25.1%)
  7. optional-x86_64-gnu-parallel-frontend: 2h 40m -> 2h (-24.9%)
  8. dist-x86_64-solaris: 1h 18m -> 1h 35m (+22.1%)
  9. tidy: 2m 29s -> 1m 58s (-20.3%)
  10. x86_64-gnu-gcc-core-tests: 14m 48s -> 12m 18s (-16.9%)
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.

@Shourya742 Shourya742 deleted the 2026-06-08-donot-eagerly-normalize-alias-during-coherence branch June 13, 2026 03:45
@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (4e391cf): comparison URL.

Overall result: ❌✅ regressions and improvements - please read:

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

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.4% [0.3%, 0.5%] 6
Regressions ❌
(secondary)
0.4% [0.3%, 0.5%] 3
Improvements ✅
(primary)
-0.2% [-0.3%, -0.1%] 4
Improvements ✅
(secondary)
-0.2% [-0.2%, -0.2%] 3
All ❌✅ (primary) 0.2% [-0.3%, 0.5%] 10

Max RSS (memory usage)

Results (primary 1.5%, secondary 6.6%)

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

mean range count
Regressions ❌
(primary)
1.5% [0.8%, 2.2%] 2
Regressions ❌
(secondary)
6.6% [6.6%, 6.6%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.5% [0.8%, 2.2%] 2

Cycles

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

Binary size

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

Bootstrap: 518.069s -> 516.925s (-0.22%)
Artifact size: 401.35 MiB -> 400.84 MiB (-0.13%)

@panstromek

Copy link
Copy Markdown
Contributor

perf triage:

This PR fixes the regression from #155767 and the primary results in nalgebra and diesel looks to be roughly inverse of the results on that PR. It also fixes beta regression, and is part of an important line of work on the type system. Given all that, I think the results are acceptable.

@rustbot label: +perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Jun 16, 2026
@lcnr lcnr mentioned this pull request Jun 18, 2026
@adwinwhite

Copy link
Copy Markdown
Contributor

The repro minimization probably should be added as a regression test?

@lcnr

lcnr commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

The repro minimization probably should be added as a regression test?

what do you mean, we did add tests/ui/traits/next-solver/coherence/coherence-unknowable-does-not-eagerly-normalize.rs as a test. Am I missing another variant here?

@adwinwhite

Copy link
Copy Markdown
Contributor

Never mind. I was too blind to see it.

@cuviper

cuviper commented Jun 24, 2026

Copy link
Copy Markdown
Member

@jackh726 @lcnr have you discussed this yet as a T-types backport? Please apply the beta-accepted label when you're ready, keeping it nominated too, and I'll take care of it as T-release.

@jackh726 jackh726 added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Jun 24, 2026
@cuviper cuviper mentioned this pull request Jun 25, 2026
@cuviper cuviper modified the milestones: 1.98.0, 1.97.0 Jun 25, 2026
@cuviper cuviper removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jun 25, 2026
rust-bors Bot pushed a commit that referenced this pull request Jun 26, 2026
[beta] backports

- Do not eagerly normalize alias during coherence #157617
- Don't try to remove assignments in SimplifyComparisonIntegral #158214

r? cuviper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beta-accepted Accepted for backporting to the compiler in the beta channel. merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. T-types Relevant to the types team, which will review and decide on the PR/issue. 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.

1.97 beta regression: "conflicting implementations of trait"