Skip to content

Instantiate auto trait/Copy/Clone/Sized before computing constituent types binder #143538

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 9, 2025

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Jul 6, 2025

This makes the binder logic w.r.t. coroutines a bit simpler.

r? lcnr

@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. labels Jul 6, 2025
@compiler-errors
Copy link
Member Author

@bors2 try @rust-timer queue

and needs crater too when that's done

@rust-timer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Jul 6, 2025

⌛ Trying commit 41eb6d8 with merge ad95a52

To cancel the try build, run the command @bors2 try cancel.

rust-bors bot added a commit that referenced this pull request Jul 6, 2025
Instantiate auto trait before computing higher-ranked constituent types

This will need an FCP and a crater run, but I think this makes the binder logic w.r.t. auto traits and coroutines a bit simpler.

r? lcnr
@compiler-errors compiler-errors added the needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. label Jul 6, 2025
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 6, 2025
@compiler-errors compiler-errors added T-types Relevant to the types team, which will review and decide on the PR/issue. and removed T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 6, 2025
@rust-bors
Copy link

rust-bors bot commented Jul 6, 2025

☀️ Try build successful (CI)
Build commit: ad95a52 (ad95a52e03621d91078ef94a829abc288aed9fb5, parent: de031bbcb161b0b7fc0eb16f77b02ce9fbdf4c9e)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (ad95a52): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

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

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary -2.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)
- - 0
All ❌✅ (primary) -2.4% [-2.4%, -2.4%] 1

Cycles

Results (secondary -4.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)
-4.5% [-4.5%, -4.5%] 1
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 460.528s -> 461.621s (0.24%)
Artifact size: 372.13 MiB -> 372.18 MiB (0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 7, 2025
@lcnr
Copy link
Contributor

lcnr commented Jul 7, 2025

why does this need an FCP? we enter the merged binders right after calling constituent_types_for_ty and whether we've got placeholders from 2 different universes shouldn't matter 🤔 it would only matter if there was a way to create infer vars which can only name some of the placeholders, this shouldn't happen

We always instantiate the binder after calling copy_clone_conditions as well.

@compiler-errors compiler-errors removed the needs-fcp This change is insta-stable, or significant enough to need a team FCP to proceed. label Jul 7, 2025
@compiler-errors compiler-errors force-pushed the instantiate-auto-trait branch from 41eb6d8 to 9cb805e Compare July 7, 2025 22:21
@compiler-errors
Copy link
Member Author

Yeah, I don't see why this has an FCP. Was just being a bit conservative, but there's no observable behavioral change here that I can see.

@compiler-errors
Copy link
Member Author

@bors2 try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Jul 7, 2025

⌛ Trying commit 9cb805e with merge 18fd892

To cancel the try build, run the command @bors2 try cancel.

rust-bors bot added a commit that referenced this pull request Jul 7, 2025
Instantiate auto trait before computing higher-ranked constituent types

This makes the binder logic w.r.t. auto traits and coroutines a bit simpler.

r? lcnr
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 7, 2025
@rust-bors
Copy link

rust-bors bot commented Jul 8, 2025

☀️ Try build successful (CI)
Build commit: 18fd892 (18fd892b5bfc2ba679fb0c0af2b5b4f5fd09a6bb, parent: 2f8eeb2bba86b8f457ec602c578473c711f85628)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (18fd892): comparison URL.

Overall result: ❌ regressions - please read the text below

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @rustbot label: +perf-regression-triaged. If not, please fix the regressions and do another perf run. If its results are neutral or positive, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +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.2% [0.2%, 0.2%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.2% [0.2%, 0.2%] 3

Max RSS (memory usage)

Results (secondary 2.2%)

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

Cycles

Results (primary -0.8%, secondary 1.1%)

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

mean range count
Regressions ❌
(primary)
2.2% [2.2%, 2.2%] 1
Regressions ❌
(secondary)
4.8% [4.8%, 4.8%] 1
Improvements ✅
(primary)
-3.8% [-3.8%, -3.8%] 1
Improvements ✅
(secondary)
-2.7% [-2.7%, -2.7%] 1
All ❌✅ (primary) -0.8% [-3.8%, 2.2%] 2

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 465.909s -> 464.854s (-0.23%)
Artifact size: 372.26 MiB -> 372.25 MiB (-0.00%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Jul 8, 2025
@compiler-errors compiler-errors changed the title Instantiate auto trait before computing higher-ranked constituent types Instantiate auto trait/Copy/Clone/Sized before computing constituent types binder Jul 8, 2025
@compiler-errors
Copy link
Member Author

This is either noise or insignificant wrt the cleanup

@rustbot ready

@bors
Copy link
Collaborator

bors commented Jul 8, 2025

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

| ty::Str
| ty::Slice(..)
| ty::Foreign(..)
| ty::Ref(_, _, hir::Mutability::Mut) => {}
Copy link
Contributor

Choose a reason for hiding this comment

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

the comment is wrong for &mut _ 🤔

@lcnr
Copy link
Contributor

lcnr commented Jul 8, 2025

r=me after rebase + nit

@compiler-errors compiler-errors force-pushed the instantiate-auto-trait branch from 9cb805e to bbb409c Compare July 8, 2025 16:35
@compiler-errors
Copy link
Member Author

@bors r=lcnr

@bors
Copy link
Collaborator

bors commented Jul 9, 2025

📌 Commit bbb409c has been approved by lcnr

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Jul 9, 2025

🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened.

@bors bors 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 Jul 9, 2025
@bors
Copy link
Collaborator

bors commented Jul 9, 2025

⌛ Testing commit bbb409c with merge e43d139...

@bors
Copy link
Collaborator

bors commented Jul 9, 2025

☀️ Test successful - checks-actions
Approved by: lcnr
Pushing e43d139 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 9, 2025
@bors bors merged commit e43d139 into rust-lang:master Jul 9, 2025
12 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 9, 2025
Copy link
Contributor

github-actions bot commented Jul 9, 2025

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 e3fccdd (parent) -> e43d139 (this PR)

Test differences

Show 10 test diffs

10 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 e43d139a82620a268d3828a73e12a8679339e8f8 --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. dist-apple-various: 8213.3s -> 5813.2s (-29.2%)
  2. dist-x86_64-apple: 9431.4s -> 7293.2s (-22.7%)
  3. x86_64-apple-2: 5123.6s -> 4041.6s (-21.1%)
  4. x86_64-gnu-llvm-20-1: 3255.8s -> 3664.6s (12.6%)
  5. pr-check-2: 2252.9s -> 2496.4s (10.8%)
  6. aarch64-apple: 5186.1s -> 4652.8s (-10.3%)
  7. x86_64-gnu-tools: 3307.5s -> 3632.7s (9.8%)
  8. i686-msvc-1: 9184.5s -> 9884.7s (7.6%)
  9. x86_64-apple-1: 7545.5s -> 8089.3s (7.2%)
  10. aarch64-gnu: 6238.3s -> 6664.0s (6.8%)
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
Collaborator

Finished benchmarking commit (e43d139): comparison URL.

Overall result: ❌ regressions - please read the text below

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.2% [0.2%, 0.3%] 3
Regressions ❌
(secondary)
0.0% [0.0%, 0.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.2% [0.2%, 0.3%] 3

Max RSS (memory usage)

Results (primary 7.5%, secondary -1.9%)

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

mean range count
Regressions ❌
(primary)
7.5% [7.5%, 7.5%] 1
Regressions ❌
(secondary)
2.0% [1.8%, 2.4%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.6% [-5.6%, -1.7%] 7
All ❌✅ (primary) 7.5% [7.5%, 7.5%] 1

Cycles

Results (primary 2.1%)

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

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

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 464.444s -> 464.828s (0.08%)
Artifact size: 374.45 MiB -> 374.47 MiB (0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-types Relevant to the types team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants