Skip to content

[CRATER] Require equality for symmetric LUB coercion#150408

Draft
jackh726 wants to merge 5 commits intorust-lang:mainfrom
jackh726:multistep-coercion-cleanup
Draft

[CRATER] Require equality for symmetric LUB coercion#150408
jackh726 wants to merge 5 commits intorust-lang:mainfrom
jackh726:multistep-coercion-cleanup

Conversation

@jackh726
Copy link
Member

Ensures that these both error:

struct Wrap3<T: ?Sized>(T);

impl<'b, T: ?Sized + std::marker::Unsize<U> + std::ops::CoerceUnsized<U>, U: ?Sized>
    std::ops::CoerceUnsized<Wrap3<U>> for Wrap3<T> {}

type I = Wrap3<Inner>;
type J = Wrap3<dyn Dynable + Send>;
type K = Wrap3<dyn Dynable>;

// LUB is `J` on nightly
match 0 {
    0 => &Wrap3(Inner)      as &I,
    1 => &Wrap3(Inner)      as &J,
    2 => &Wrap3(Inner)      as &K,
    _ => loop {},
}

// LUB is `K` on nightly
match 0 {
    0 => &Wrap3(Inner)      as &I,
    1 => &Wrap3(Inner)      as &K,
    2 => &Wrap3(Inner)      as &J,
    _ => loop {},
}

r? ghost

@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. labels Dec 26, 2025
@rust-log-analyzer

This comment has been minimized.

@jackh726
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Dec 26, 2025
[CRATER] Require equality for symmetric LUB coercion
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Dec 26, 2025
@rust-bors
Copy link
Contributor

rust-bors bot commented Dec 26, 2025

☀️ Try build successful (CI)
Build commit: bac5816 (bac5816c5f3d02cebd0599070af62d1782530294, parent: 82dd3cb008233bfe50ba6b8d6618e6bbd6054eb1)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (bac5816): 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.4% [0.1%, 0.9%] 22
Regressions ❌
(secondary)
3.8% [0.1%, 9.6%] 31
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.4% [0.1%, 0.9%] 22

Max RSS (memory usage)

Results (primary 0.8%, secondary 1.5%)

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

mean range count
Regressions ❌
(primary)
3.7% [1.3%, 9.1%] 4
Regressions ❌
(secondary)
2.2% [1.1%, 2.8%] 3
Improvements ✅
(primary)
-5.1% [-5.4%, -4.8%] 2
Improvements ✅
(secondary)
-0.7% [-0.7%, -0.7%] 1
All ❌✅ (primary) 0.8% [-5.4%, 9.1%] 6

Cycles

Results (primary -2.8%, secondary 5.9%)

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)
5.9% [4.4%, 7.7%] 8
Improvements ✅
(primary)
-2.8% [-3.8%, -1.4%] 12
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.8% [-3.8%, -1.4%] 12

Binary size

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

Bootstrap: 492.292s -> 484.36s (-1.61%)
Artifact size: 392.38 MiB -> 392.44 MiB (0.02%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Dec 27, 2025
@jackh726
Copy link
Member Author

@craterbot check

@craterbot
Copy link
Collaborator

👌 Experiment pr-150408 created and queued.
🤖 Automatically detected try build bac5816
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 27, 2025
@craterbot
Copy link
Collaborator

🚧 Experiment pr-150408 is now running

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot
Copy link
Collaborator

🎉 Experiment pr-150408 is completed!
📊 519 regressed and 4 fixed (768548 total)
📊 2039 spurious results on the retry-regressed-list.txt, consider a retry1 if this is a significant amount.
📰 Open the summary report.

⚠️ If you notice any spurious failure please add them to the denylist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

Footnotes

  1. re-run the experiment with crates=https://crater-reports.s3.amazonaws.com/pr-150408/retry-regressed-list.txt

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Jan 4, 2026
@rust-cloud-vms rust-cloud-vms bot force-pushed the multistep-coercion-cleanup branch from 72b1d15 to 14c30b9 Compare January 10, 2026 21:53
@jackh726
Copy link
Member Author

@bors try

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Jan 10, 2026
[CRATER] Require equality for symmetric LUB coercion
@rust-log-analyzer

This comment has been minimized.

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 11, 2026

☀️ Try build successful (CI)
Build commit: 9bb5641 (9bb5641bfa3e7e0c9ede079ad0a1d43b1b7422bc, parent: f57eac1bf98cb5d578e3364b64365ec398c137df)

@jackh726
Copy link
Member Author

@craterbot run name=require-direct mode=check-only start=master#f57eac1bf98cb5d578e3364b64365ec398c137df end=try#9bb5641bfa3e7e0c9ede079ad0a1d43b1b7422bc crates=https://crater-reports.s3.amazonaws.com/pr-150408/retry-regressed-list.txt

@craterbot
Copy link
Collaborator

👌 Experiment require-direct created and queued.
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 11, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-bors rust-bors bot 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 Jan 23, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 23, 2026

💔 Test for 1eba9e2 failed: CI. Failed job:

@rust-log-analyzer

This comment has been minimized.

@jackh726
Copy link
Member Author

@bors retry

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 23, 2026

❗ You can only retry pull requests that are approved and have a previously failed auto build.

@jackh726
Copy link
Member Author

@bors try

@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Jan 23, 2026
[CRATER] Require equality for symmetric LUB coercion
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 23, 2026

💔 Test for 8a19fe1 failed: CI. Failed job:

@rust-log-analyzer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rust-cloud-vms rust-cloud-vms bot force-pushed the multistep-coercion-cleanup branch from da88a87 to 690f50a Compare February 17, 2026 10:15
@jackh726
Copy link
Member Author

@bors try

@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Feb 17, 2026
[CRATER] Require equality for symmetric LUB coercion
@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
Diff in /checkout/compiler/rustc_hir_typeck/src/coercion_guidance.rs:46:
 };
 use rustc_infer::traits::{Obligation, PredicateObligation, PredicateObligations, SelectionError};
 use rustc_middle::ty::adjustment::{
-    Adjust, Adjustment, AllowTwoPhase, AutoBorrow, AutoBorrowMutability, DerefAdjustKind, PointerCoercion,
+    Adjust, Adjustment, AllowTwoPhase, AutoBorrow, AutoBorrowMutability, DerefAdjustKind,
+    PointerCoercion,
 };
 use rustc_middle::ty::error::TypeError;
 use rustc_middle::ty::relate::{self, Relate, TypeRelation};
fmt: checked 6702 files
Bootstrap failed while executing `test src/tools/tidy tidyselftest --extra-checks=py,cpp,js,spellcheck`

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 17, 2026

☀️ Try build successful (CI)
Build commit: 2f436d5 (2f436d5822164c7dc46729ecf9f1f8faa09fe9e4, parent: 1210e9fa3ee9c9712fa694f90f7a032f2f0fd786)

@jackh726
Copy link
Member Author

@craterbot run name=feb-17 mode=check-only start=master#1210e9fa3ee9c9712fa694f90f7a032f2f0fd786 end=try#2f436d5822164c7dc46729ecf9f1f8faa09fe9e4 crates=https://crater-reports.s3.amazonaws.com/pr-150408/retry-regressed-list.txt

@craterbot
Copy link
Collaborator

👌 Experiment feb-17 created and queued.
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perf-regression Performance regression. S-waiting-on-crater Status: Waiting on a crater run to be completed. 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.

5 participants