Skip to content

Conversation

@adwinwhite
Copy link
Contributor

@rustbot rustbot added 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 Jan 26, 2026
@adwinwhite adwinwhite marked this pull request as ready for review January 26, 2026 09:16
@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 Jan 26, 2026
Comment on lines 4 to 6
// Previously we return all opaques in `method_auto_deref_steps` which normalizes the opaque
// to `u32`, causing obligations to fail.
// We shouldn't return incorrectly constrained opaques in this query.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// Previously we return all opaques in `method_auto_deref_steps` which normalizes the opaque
// to `u32`, causing obligations to fail.
// We shouldn't return incorrectly constrained opaques in this query.
// Previously `method_auto_deref_steps` would also return opaque
// types which have already been defined in the parent context.
//
// We then handled these opaque types by emitting `AliasRelate` goals
// when instantiating its result, assuming that operation to be infallible.
// By returning opaque type constraints from the parent context and
// constraining the hidden type without reproving the item bounds of
// the opaque, this ended up causing ICE.

Copy link
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.

r=me after comment nit

thanks ❤️

@lcnr
Copy link
Contributor

lcnr commented Jan 26, 2026

@bors r+

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 26, 2026

📌 Commit f6efe7e 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-review Status: Awaiting review from the assignee but also interested parties. labels Jan 26, 2026
Zalathar added a commit to Zalathar/rust that referenced this pull request Jan 26, 2026
Do not return incorrectly constrained opaques in `method_autoderef_steps`

Fixes rust-lang/trait-system-refactor-initiative#263

r? @lcnr
Zalathar added a commit to Zalathar/rust that referenced this pull request Jan 26, 2026
Do not return incorrectly constrained opaques in `method_autoderef_steps`

Fixes rust-lang/trait-system-refactor-initiative#263

r? @lcnr
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jan 26, 2026
Do not return incorrectly constrained opaques in `method_autoderef_steps`

Fixes rust-lang/trait-system-refactor-initiative#263

r? @lcnr
rust-bors bot pushed a commit that referenced this pull request Jan 26, 2026
Rollup of 3 pull requests

Successful merges:

 - #151676 (Do not return incorrectly constrained opaques in `method_autoderef_steps`)
 - #151626 (Remove `Deref<Target = TyCtxt>` from `QueryCtxt`)
 - #151661 (Suggest changing `iter`/`into_iter` when the other was meant)
@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 Jan 26, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 26, 2026

☀️ Test successful - CI
Approved by: lcnr
Duration: 3h 18m 56s
Pushing 4742769 to main...

@rust-bors rust-bors bot merged commit 4742769 into rust-lang:main Jan 26, 2026
12 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Jan 26, 2026
@github-actions
Copy link
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 db6bc0f (parent) -> 4742769 (this PR)

Test differences

Show 14 test diffs

Stage 1

  • [ui] tests/ui/traits/next-solver/opaques/method_autoderef_constraints.rs: [missing] -> pass (J0)

Stage 2

  • [ui] tests/ui/traits/next-solver/opaques/method_autoderef_constraints.rs: [missing] -> pass (J1)

Additionally, 12 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 474276961f48b0d05f4ea260ba400096b027584e --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-aarch64-linux: 9272.8s -> 6669.5s (-28.1%)
  2. aarch64-apple: 10339.6s -> 7889.8s (-23.7%)
  3. dist-ohos-aarch64: 4478.0s -> 5537.9s (+23.7%)
  4. x86_64-gnu-gcc: 3325.9s -> 3852.8s (+15.8%)
  5. test-various: 6653.8s -> 7571.1s (+13.8%)
  6. dist-apple-various: 4557.0s -> 5157.4s (+13.2%)
  7. x86_64-msvc-1: 8247.6s -> 9206.0s (+11.6%)
  8. i686-gnu-1: 7344.8s -> 8046.1s (+9.5%)
  9. x86_64-gnu-llvm-20-1: 4052.7s -> 4418.5s (+9.0%)
  10. i686-gnu-nopt-1: 7350.2s -> 7988.5s (+8.7%)
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 (4742769): comparison URL.

Overall result: ❌ regressions - 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.2% [0.1%, 0.2%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

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

Cycles

Results (primary -2.4%, secondary 3.7%)

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

mean range count
Regressions ❌
(primary)
2.9% [2.9%, 2.9%] 1
Regressions ❌
(secondary)
3.7% [3.0%, 4.8%] 3
Improvements ✅
(primary)
-3.2% [-3.9%, -2.1%] 7
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.4% [-3.9%, 2.9%] 8

Binary size

Results (primary 0.0%, secondary 0.0%)

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

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

Bootstrap: 473.172s -> 473.418s (0.05%)
Artifact size: 383.63 MiB -> 383.64 MiB (0.00%)

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. 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)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

method_autoderef_steps returns all opaques, resulting in ICE if they are incorrectly constrained

4 participants