rust/src/test/ui/auto-traits
Esteban Kuber 3aac307ca6 Mention implementers of unsatisfied trait
When encountering an unsatisfied trait bound, if there are no other
suggestions, mention all the types that *do* implement that trait:

```
error[E0277]: the trait bound `f32: Foo` is not satisfied
  --> $DIR/impl_wf.rs:22:6
   |
LL | impl Baz<f32> for f32 { }
   |      ^^^^^^^^ the trait `Foo` is not implemented for `f32`
   |
   = help: the following other types implement trait `Foo`:
             Option<T>
             i32
             str
note: required by a bound in `Baz`
  --> $DIR/impl_wf.rs:18:31
   |
LL | trait Baz<U: ?Sized> where U: Foo { }
   |                               ^^^ required by this bound in `Baz`
```

Mention implementers of traits in `ImplObligation`s.

Do not mention other `impl`s for closures, ranges and `?`.
2022-04-04 21:01:42 +00:00
..
auto-is-contextual.rs
auto-trait-projection-recursion.rs
auto-trait-validation.fixed
auto-trait-validation.rs
auto-trait-validation.stderr
auto-traits.rs
issue-23080-2.rs
issue-23080-2.stderr
issue-23080.rs
issue-23080.stderr
issue-84075.rs
issue-84075.stderr
suspicious-impls-lint.rs relax suspicious_auto_trait_impls lint 2022-03-14 09:07:49 +01:00
suspicious-impls-lint.stderr relax suspicious_auto_trait_impls lint 2022-03-14 09:07:49 +01:00
typeck-auto-trait-no-supertraits-2.rs
typeck-auto-trait-no-supertraits-2.stderr
typeck-auto-trait-no-supertraits.rs
typeck-auto-trait-no-supertraits.stderr
typeck-default-trait-impl-constituent-types-2.rs
typeck-default-trait-impl-constituent-types-2.stderr
typeck-default-trait-impl-constituent-types.rs
typeck-default-trait-impl-constituent-types.stderr
typeck-default-trait-impl-negation.rs
typeck-default-trait-impl-negation.stderr
typeck-default-trait-impl-precedence.rs
typeck-default-trait-impl-precedence.stderr Mention implementers of unsatisfied trait 2022-04-04 21:01:42 +00:00