rust/tests
bors bd3ac03300 Auto merge of #145640 - estebank:point-at-impl-e0277, r=nnethercote
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`
```
2025-11-01 20:11:26 +00:00
..
assembly-llvm add tier 3 HelenOS compiler targets 2025-10-31 09:27:40 +01:00
auxiliary Add test for addrspacecasting global vars 2025-09-03 08:40:51 +02:00
codegen-llvm Move wasm throw intrinsic back to unwind 2025-10-30 15:13:32 +03:00
codegen-units pub async fn implementation coroutine (func::{closure#0}) is monomorphized, when func itself is monomorphized 2025-09-01 13:45:00 +07:00
coverage Add coverage scope for controlling paths in code coverage 2025-10-27 12:54:24 +01:00
coverage-run-rustdoc
crashes add crashes tests for overlapping spans 2025-10-23 22:15:34 +00:00
debuginfo Re-enable macro-stepping test for AArch64 2025-10-27 10:26:57 +00:00
incremental Add a fast path for lowering trivial consts 2025-10-25 16:59:53 -04:00
mir-opt require T: !Unpin for &pin mut T to be projected to &pin mut T.U where U: ?Unpin 2025-10-30 07:56:17 +08:00
pretty Remove QPath::LangItem from ranges 2025-10-27 21:19:38 -05:00
run-make Rollup merge of #148115 - fmease:rustdoc-no-capture, r=notriddle 2025-10-30 02:43:43 -04:00
run-make-cargo Skip the panic-immediate-abort-works test when cross-compiling 2025-09-22 21:13:38 -04:00
rustdoc Move rustdoc tests to appropriate subdirectories 2025-10-26 19:16:41 -07:00
rustdoc-gui rustdoc-search: add test case for throbber 2025-10-07 12:59:58 -07:00
rustdoc-js Add regression test for including extern crates in import filtering 2025-11-01 00:13:19 +01:00
rustdoc-js-std Add regression test for including derive macros in macro filtering 2025-10-27 16:00:32 +01:00
rustdoc-json Add tests for doc(attribute = "...") attribute 2025-08-28 15:56:30 +02:00
rustdoc-ui Rollup merge of #148115 - fmease:rustdoc-no-capture, r=notriddle 2025-10-30 02:43:43 -04:00
ui Auto merge of #145640 - estebank:point-at-impl-e0277, r=nnethercote 2025-11-01 20:11:26 +00:00
ui-fulldeps When more than a single impl and less than 4 could apply, point at them 2025-10-31 20:44:01 +00:00
COMPILER_TESTS.md