rust/compiler/rustc_span/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
..
analyze_source_file remove redundant closures (clippy::redundant_closure) 2021-01-03 13:34:24 +01:00
lev_distance Improve method name suggestions 2022-04-03 16:38:57 +01:00
source_map Split span_to_string into span_to_diagnostic/embeddable_string 2021-05-11 00:04:12 +01:00
symbol Move the Lock into symbol::Interner 2021-09-15 18:46:45 +02:00
analyze_source_file.rs Fix some clippy lints 2020-12-03 17:08:19 -05:00
caching_source_map_view.rs Convert debug_assert to assert in CachingSourceMapView 2021-09-17 12:01:29 -05:00
def_id.rs add #[rustc_pass_by_value] to more types 2022-03-08 15:39:52 +01:00
edition.rs Update LATEST_STABLE_EDITION to 2021. 2021-08-30 15:33:09 +02:00
fatal_error.rs Make fatal DiagnosticBuilder yield never 2022-03-27 22:25:32 -07:00
hygiene.rs Spellchecking compiler comments 2022-03-30 15:14:15 -04:00
lev_distance.rs Improve method name suggestions 2022-04-03 16:38:57 +01:00
lib.rs Enable rustc_pass_by_value for Span 2022-02-25 08:00:53 -05:00
source_map.rs Make span_extend_to_prev_str() more robust 2022-01-31 19:28:15 +01:00
span_encoding.rs Enable rustc_pass_by_value for Span 2022-02-25 08:00:53 -05:00
symbol.rs Mention implementers of unsatisfied trait 2022-04-04 21:01:42 +00:00
tests.rs Inline implementation of lookup_line 2021-07-08 23:30:53 +02:00