rust/compiler
Dylan DPC a5c81695a9
Rollup merge of - estebank:mention-impls-for-unsatisfied-trait, r=davidtwco
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 trait `Foo` is implemented for `i32`
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`
```
```
error[E0277]: the trait bound `u32: Foo` is not satisfied
  --> $DIR/associated-types-path-2.rs:29:5
   |
LL |     f1(2u32, 4u32);
   |     ^^ the trait `Foo` is not implemented for `u32`
   |
   = help: the trait `Foo` is implemented for `i32`
note: required by a bound in `f1`
  --> $DIR/associated-types-path-2.rs:13:14
   |
LL | pub fn f1<T: Foo>(a: T, x: T::A) {}
   |              ^^^ required by this bound in `f1`
```

Suggest dereferencing in more cases.

Fix , fix .
2022-04-05 01:53:31 +02:00
..
rustc Propagate parallel_compiler feature through rustc crates. Turned off feature gives change of builded crates: 238 -> 224. 2022-03-28 08:41:12 +03:00
rustc_apfloat Addressed comments by @compiler-errors and @bjorn3 2022-03-30 17:04:46 -04:00
rustc_arena mark FIXMES for all the places found that are probably offset_from 2022-03-29 20:18:28 -04:00
rustc_ast Rollup merge of - nyurik:compiler-spell-comments, r=compiler-errors 2022-03-31 04:57:28 +02:00
rustc_ast_lowering Record item-likes in ItemLowerer. 2022-03-31 13:48:16 +02:00
rustc_ast_passes Stabilize native library modifier syntax and the whole-archive modifier specifically 2022-03-30 23:53:21 +03:00
rustc_ast_pretty Remove Nonterminal::NtTT. 2022-03-28 10:03:02 +11:00
rustc_attr
rustc_borrowck update comment 2022-03-31 15:41:52 +02:00
rustc_builtin_macros Spellchecking some comments 2022-03-30 01:39:38 -04:00
rustc_codegen_cranelift Cleanup after some refactoring in rustc_target 2022-04-03 21:29:57 +02:00
rustc_codegen_gcc Cleanup after some refactoring in rustc_target 2022-04-03 21:29:57 +02:00
rustc_codegen_llvm Replace every String in Target(Options) with Cow<'static, str> 2022-04-03 21:29:57 +02:00
rustc_codegen_ssa Auto merge of - petrochenkov:linkregr, r=wesleywiser 2022-04-04 02:23:15 +00:00
rustc_const_eval Auto merge of - cjgillot:flat-metadata, r=oli-obk 2022-04-01 21:16:41 +00:00
rustc_data_structures Auto merge of - saethlin:unsafe-debug-asserts, r=Amanieu 2022-04-03 16:04:47 +00:00
rustc_driver Address review comments and add a test 2022-04-02 17:26:39 +02:00
rustc_error_codes rework error messages for incorrect inherent impls 2022-03-30 11:23:58 +02:00
rustc_errors Mention implementers of unsatisfied trait 2022-04-04 21:01:42 +00:00
rustc_expand Auto merge of - Dylan-DPC:rollup-2p9hzi3, r=Dylan-DPC 2022-04-04 19:51:52 +00:00
rustc_feature Rollup merge of - jackh726:gats_extended, r=compiler-errors 2022-03-31 00:26:29 +02:00
rustc_fs_util
rustc_graphviz
rustc_hir Store next_disambiguator in Definitions. 2022-03-31 13:34:54 +02:00
rustc_hir_pretty
rustc_incremental Spellchecking some comments 2022-03-30 01:39:38 -04:00
rustc_index Spellchecking compiler comments 2022-03-30 15:14:15 -04:00
rustc_infer Rollup merge of - lcnr:obligation-cause, r=oli-obk 2022-04-02 03:34:27 +02:00
rustc_interface Address review comments and add a test 2022-04-02 17:26:39 +02:00
rustc_lexer Reduce max hash in raw strings from u16 to u8 2022-03-23 22:13:55 +01:00
rustc_lint invalid_value lint: detect invalid initialization of arrays 2022-04-01 09:59:11 -04:00
rustc_lint_defs Spellchecking compiler comments 2022-03-30 15:14:15 -04:00
rustc_llvm Stabilize native library modifier syntax and the whole-archive modifier specifically 2022-03-30 23:53:21 +03:00
rustc_log
rustc_macros
rustc_metadata Replace every String in Target(Options) with Cow<'static, str> 2022-04-03 21:29:57 +02:00
rustc_middle Mention implementers of unsatisfied trait 2022-04-04 21:01:42 +00:00
rustc_mir_build obligation cause: RepeatVec -> RepeatValueCopy 2022-03-31 12:51:46 +02:00
rustc_mir_dataflow Spellchecking compiler comments 2022-03-30 15:14:15 -04:00
rustc_mir_transform Mention implementers of unsatisfied trait 2022-04-04 21:01:42 +00:00
rustc_monomorphize Rollup merge of - InfRandomness:infrandomness/lint_largemove_note, r=compiler-errors 2022-03-31 13:09:53 +02:00
rustc_parse Auto merge of - camelid:inc-parser-sugg, r=davidtwco 2022-04-03 05:24:20 +00:00
rustc_parse_format Spellchecking compiler comments 2022-03-30 15:14:15 -04:00
rustc_passes Rollup merge of - jam1garner:naked-function-compile-error, r=tmiasko 2022-04-03 23:21:42 +02:00
rustc_plugin_impl
rustc_privacy Rollup merge of - nyurik:compiler-spell-comments, r=compiler-errors 2022-03-31 04:57:28 +02:00
rustc_query_impl rework implementation for inherent impls for builtin types 2022-03-30 11:23:58 +02:00
rustc_query_system Spellchecking compiler comments 2022-03-30 15:14:15 -04:00
rustc_resolve Stop emitting lints during lowering. 2022-03-31 13:46:06 +02:00
rustc_save_analysis Rollup merge of - nyurik:compiler-spell-comments, r=compiler-errors 2022-03-31 04:57:28 +02:00
rustc_serialize Replace every Vec in Target(Options) with it's Cow equivalent 2022-04-03 21:29:57 +02:00
rustc_session Cleanup after some refactoring in rustc_target 2022-04-03 21:29:57 +02:00
rustc_span Mention implementers of unsatisfied trait 2022-04-04 21:01:42 +00:00
rustc_symbol_mangling
rustc_target Cleanup after some refactoring in rustc_target 2022-04-03 21:29:57 +02:00
rustc_trait_selection Rollup merge of - estebank:mention-impls-for-unsatisfied-trait, r=davidtwco 2022-04-05 01:53:31 +02:00
rustc_traits Remove opaque type obligation and just register opaque types as they are encountered. 2022-03-28 16:57:45 +00:00
rustc_ty_utils Auto merge of - cjgillot:flat-metadata, r=oli-obk 2022-04-01 21:16:41 +00:00
rustc_type_ir Revert "Auto merge of - oli-obk:sad_revert, r=oli-obk" 2022-03-28 16:27:14 +00:00
rustc_typeck Improve method name suggestions 2022-04-03 16:38:57 +01:00