Skip to content

Conversation

@estebank
Copy link
Contributor

error[E0277]: the trait bound `u32: Trait` is not satisfied
  --> $DIR/trait_objects_fail.rs:26:9
   |
LL |     foo(&10_u32);
   |         ^^^^^^^ the trait `Trait` is not implemented for `u32`
   |
help: the trait `Trait<12>` is not implemented for `u32`
      but trait `Trait<2>` is implemented for it
  --> $DIR/trait_objects_fail.rs:7:1
   |
LL | impl Trait<2> for u32 {}
   | ^^^^^^^^^^^^^^^^^^^^^
   = note: required for the cast from `&u32` to `&dyn Trait`

Pointing at the impl definition that could apply given a different self type is particularly useful when it has a blanket self type, as it might not be obvious and is not trivially greppable:

error[E0277]: the trait bound `RawImpl<_>: Raw<_>` is not satisfied
  --> $DIR/issue-62742.rs:4:5
   |
LL |     WrongImpl::foo(0i32);
   |     ^^^^^^^^^ unsatisfied trait bound
   |
help: the trait `Raw<_>` is not implemented for `RawImpl<_>`
      but trait `Raw<[_]>` is implemented for it
  --> $DIR/issue-62742.rs:29:1
   |
LL | impl<T> Raw<[T]> for RawImpl<T> {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `SafeImpl`
  --> $DIR/issue-62742.rs:33:35
   |
LL | pub struct SafeImpl<T: ?Sized, A: Raw<T>>(PhantomData<(A, T)>);
   |                                   ^^^^^^ required by this bound in `SafeImpl`

@rustbot
Copy link
Collaborator

rustbot commented Aug 20, 2025

r? @nnethercote

rustbot has assigned @nnethercote.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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 Aug 20, 2025
@rustbot
Copy link
Collaborator

rustbot commented Aug 20, 2025

rustc_errors::emitter was changed

cc @Muscraft

This PR modifies tests/ui/issues/. If this PR is adding new tests to tests/ui/issues/,
please refrain from doing so, and instead add it to more descriptive subdirectories.

@rust-log-analyzer

This comment has been minimized.

@estebank estebank force-pushed the point-at-impl-e0277 branch from 3967b4e to c6c62f4 Compare August 20, 2025 17:59
@rustbot rustbot added the WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) label Aug 20, 2025
@rust-log-analyzer

This comment has been minimized.

@nnethercote
Copy link
Contributor

Looks fine, r=me once everything is green.

@nnethercote nnethercote 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 Aug 22, 2025
@estebank estebank force-pushed the point-at-impl-e0277 branch from c6c62f4 to a05bf52 Compare August 22, 2025 18:59
@rustbot

This comment has been minimized.

@bors

This comment was marked as resolved.

@estebank estebank force-pushed the point-at-impl-e0277 branch from a05bf52 to 3f07cda Compare August 23, 2025 16:12
@rustbot

This comment has been minimized.

@estebank
Copy link
Contributor Author

@bors r=nnethercote

@bors
Copy link
Collaborator

bors commented Aug 23, 2025

📌 Commit 3f07cda has been approved by nnethercote

It is now in the queue for this repository.

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 23, 2025
@jhpratt
Copy link
Member

jhpratt commented Aug 23, 2025

@bors r- (has merge conflicts)

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 23, 2025
@bors
Copy link
Collaborator

bors commented Aug 24, 2025

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

@estebank estebank force-pushed the point-at-impl-e0277 branch from 3f07cda to 898ddc3 Compare August 24, 2025 16:55
@rustbot

This comment has been minimized.

@estebank
Copy link
Contributor Author

@bors r=nnethercote rollup=never

@bors
Copy link
Collaborator

bors commented Aug 24, 2025

📌 Commit 898ddc3 has been approved by nnethercote

It is now in the queue for this repository.

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Sep 29, 2025
bors added a commit that referenced this pull request Sep 29, 2025
When a trait isn't implemented, but another similar impl is found, point at it

```
error[E0277]: the trait bound `u32: Trait` is not satisfied
  --> $DIR/trait_objects_fail.rs:26:9
   |
LL |     foo(&10_u32);
   |         ^^^^^^^ the trait `Trait` is not implemented for `u32`
   |
help: the trait `Trait<12>` is not implemented for `u32`
      but trait `Trait<2>` is implemented for it
  --> $DIR/trait_objects_fail.rs:7:1
   |
LL | impl Trait<2> for u32 {}
   | ^^^^^^^^^^^^^^^^^^^^^
   = note: required for the cast from `&u32` to `&dyn Trait`
```

Pointing at the `impl` definition that *could* apply given a different self type is *particularly* useful when it has a blanket self type, as it might not be obvious and is not trivially greppable:

```
error[E0277]: the trait bound `RawImpl<_>: Raw<_>` is not satisfied
  --> $DIR/issue-62742.rs:4:5
   |
LL |     WrongImpl::foo(0i32);
   |     ^^^^^^^^^ unsatisfied trait bound
   |
help: the trait `Raw<_>` is not implemented for `RawImpl<_>`
      but trait `Raw<[_]>` is implemented for it
  --> $DIR/issue-62742.rs:29:1
   |
LL | impl<T> Raw<[T]> for RawImpl<T> {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `SafeImpl`
  --> $DIR/issue-62742.rs:33:35
   |
LL | pub struct SafeImpl<T: ?Sized, A: Raw<T>>(PhantomData<(A, T)>);
   |                                   ^^^^^^ required by this bound in `SafeImpl`
```
@bors
Copy link
Collaborator

bors commented Sep 29, 2025

⌛ Testing commit 3b3dc7b with merge 793789c...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Sep 29, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 29, 2025
@bors
Copy link
Collaborator

bors commented Oct 12, 2025

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

@nnethercote nnethercote 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 Oct 13, 2025
…int at it:

```
error[E0277]: the trait bound `u32: Trait` is not satisfied
  --> $DIR/trait_objects_fail.rs:26:9
   |
LL |     foo(&10_u32);
   |         ^^^^^^^ the trait `Trait` is not implemented for `u32`
   |
help: the trait `Trait<12>` is not implemented for `u32`
      but trait `Trait<2>` is implemented for it
  --> $DIR/trait_objects_fail.rs:7:1
   |
LL | impl Trait<2> for u32 {}
   | ^^^^^^^^^^^^^^^^^^^^^
   = note: required for the cast from `&u32` to `&dyn Trait`
```

Pointing at the `impl` definition that *could* apply given a different self type is particularly useful when it has a blanket self type, as it might not be obvious and is not trivially greppable:

```
error[E0277]: the trait bound `RawImpl<_>: Raw<_>` is not satisfied
  --> $DIR/issue-62742.rs:4:5
   |
LL |     WrongImpl::foo(0i32);
   |     ^^^^^^^^^ unsatisfied trait bound
   |
help: the trait `Raw<_>` is not implemented for `RawImpl<_>`
      but trait `Raw<[_]>` is implemented for it
  --> $DIR/issue-62742.rs:29:1
   |
LL | impl<T> Raw<[T]> for RawImpl<T> {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `SafeImpl`
  --> $DIR/issue-62742.rs:33:35
   |
LL | pub struct SafeImpl<T: ?Sized, A: Raw<T>>(PhantomData<(A, T)>);
   |                                   ^^^^^^ required by this bound in `SafeImpl`
```
…them

```
error[E0277]: the trait bound `[[u16; 3]; 2]: Bar` is not satisfied
  --> $DIR/issue-67185-2.rs:21:6
   |
LL | impl Foo for FooImpl {}
   |      ^^^ the trait `Bar` is not implemented for `[[u16; 3]; 2]`
   |
help: the following other types implement trait `Bar`
  --> $DIR/issue-67185-2.rs:9:1
   |
LL | impl Bar for [u16; 4] {}
   | ^^^^^^^^^^^^^^^^^^^^^ `[u16; 4]`
LL | impl Bar for [[u16; 3]; 3] {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `[[u16; 3]; 3]`
note: required by a bound in `Foo`
  --> $DIR/issue-67185-2.rs:14:30
   |
LL | trait Foo
   |       --- required by a bound in this trait
LL | where
LL |     [<u8 as Baz>::Quaks; 2]: Bar,
   |                              ^^^ required by this bound in `Foo`
```
@estebank estebank force-pushed the point-at-impl-e0277 branch from 3b3dc7b to c9c7272 Compare October 31, 2025 20:44
@rustbot
Copy link
Collaborator

rustbot commented Oct 31, 2025

This PR was rebased onto a different master 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.

@rust-log-analyzer

This comment has been minimized.

@estebank
Copy link
Contributor Author

@bors r=nnethercote

@bors
Copy link
Collaborator

bors commented Oct 31, 2025

📌 Commit 32aa599 has been approved by nnethercote

It is now in the queue for this repository.

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 31, 2025
@bors
Copy link
Collaborator

bors commented Nov 1, 2025

⌛ Testing commit 32aa599 with merge bd3ac03...

@bors
Copy link
Collaborator

bors commented Nov 1, 2025

☀️ Test successful - checks-actions
Approved by: nnethercote
Pushing bd3ac03 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 1, 2025
@bors bors merged commit bd3ac03 into rust-lang:master Nov 1, 2025
12 checks passed
@rustbot rustbot added this to the 1.93.0 milestone Nov 1, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 1, 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 fca2e94 (parent) -> bd3ac03 (this PR)

Test differences

Show 10 test diffs

Stage 1

  • [ui] tests/ui/allocator/not-an-allocator.rs: pass -> [missing] (J0)
  • [ui] tests/ui/allocator/not-an-allocator.rs#u: [missing] -> pass (J0)
  • [ui] tests/ui/allocator/not-an-allocator.rs#w: [missing] -> ignore (only executed when the operating system is windows) (J0)

Stage 2

  • [ui] tests/ui/allocator/not-an-allocator.rs#u: [missing] -> ignore (only executed when the target family is unix) (J1)
  • [ui] tests/ui/allocator/not-an-allocator.rs#w: [missing] -> pass (J1)
  • [ui] tests/ui/allocator/not-an-allocator.rs: pass -> [missing] (J2)
  • [ui] tests/ui/allocator/not-an-allocator.rs#u: [missing] -> pass (J3)
  • [ui] tests/ui/allocator/not-an-allocator.rs#w: [missing] -> ignore (only executed when the operating system is windows) (J3)

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 bd3ac0330018c23b111bbee176f32c377be7b319 --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-gnu-gcc: 3060.1s -> 4101.8s (+34.0%)
  2. x86_64-gnu-llvm-20: 2455.4s -> 2892.2s (+17.8%)
  3. x86_64-gnu-debug: 6696.7s -> 7798.0s (+16.4%)
  4. x86_64-gnu-stable: 6528.5s -> 7560.2s (+15.8%)
  5. i686-gnu-2: 5487.9s -> 6284.5s (+14.5%)
  6. dist-aarch64-windows-gnullvm: 4489.0s -> 5111.7s (+13.9%)
  7. x86_64-rust-for-linux: 2622.9s -> 2984.9s (+13.8%)
  8. dist-android: 1606.1s -> 1388.0s (-13.6%)
  9. test-various: 6050.3s -> 6844.7s (+13.1%)
  10. i686-gnu-nopt-1: 7274.2s -> 8132.7s (+11.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 (bd3ac03): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

Max RSS (memory usage)

Results (primary 1.6%)

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

mean range count
Regressions ❌
(primary)
1.6% [0.8%, 2.4%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.6% [0.8%, 2.4%] 2

Cycles

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

Binary size

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

Bootstrap: 474.465s -> 474.434s (-0.01%)
Artifact size: 390.82 MiB -> 390.87 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. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

7 participants