rust/compiler/rustc_errors/src
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
..
json Remove support for JSON deserialization to Rust 2022-02-20 18:58:21 -05:00
annotate_snippet_emitter_writer.rs Filter OnceNote in diagnostic infra. 2022-03-20 20:36:26 +01:00
diagnostic.rs Mention implementers of unsatisfied trait 2022-04-04 21:01:42 +00:00
diagnostic_builder.rs Make fatal DiagnosticBuilder yield never 2022-03-27 22:25:32 -07:00
emitter.rs Take &mut Diagnostic in emit_diagnostic. 2022-03-20 20:36:08 +01:00
json.rs Avoid emitting full macro body into JSON 2022-02-24 11:16:45 -05:00
lib.rs Make fatal DiagnosticBuilder yield never 2022-03-27 22:25:32 -07:00
lock.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
registry.rs Remove (lots of) dead code 2021-03-27 22:16:33 -04:00
snippet.rs Compute most of Public/Exported access level in rustc_resolve 2022-01-09 21:33:14 +00:00
styled_buffer.rs Spellchecking some comments 2022-03-30 01:39:38 -04:00