rust/compiler
bors e2661bac6d Auto merge of #95379 - icewind1991:suggest-associated-type-more, r=jackh726
show suggestion to replace generic bounds with associated types in more cases

Moves the hint to replace generic parameters with associated type bounds from the "not all associated type bounds are specified"(`E0191`) to "to many generic type parameters provided"(`E0107`).

Since `E0191` is only emitted in places where all associated types must be specified (when creating `dyn` types), the suggesting is currently not shown for other generic type uses (such as in generic type bounds). With this change the suggesting is always emitted when the number of excess generic parameters matches the number of unbound associated types.

Main motivation for the change was a lack of useful suggesting when doing

```rust
fn foo<I: Iterator<usize>>(i: I) {}
```
2022-04-19 01:59:35 +00: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 Auto merge of #95779 - cjgillot:ast-lifetimes-undeclared, r=petrochenkov 2022-04-17 12:56:19 +00:00
rustc_ast_lowering Lint elided lifetimes in path on the AST. 2022-04-17 11:03:34 +02:00
rustc_ast_passes Auto merge of #95779 - cjgillot:ast-lifetimes-undeclared, r=petrochenkov 2022-04-17 12:56:19 +00:00
rustc_ast_pretty Rollup merge of #94985 - dtolnay:constattr, r=pnkfelix 2022-04-16 19:42:00 +02:00
rustc_attr Rollup merge of #94948 - jhpratt:rustc_deprecated, r=Dylan-DPC 2022-03-20 09:14:59 +01:00
rustc_borrowck Lint elided lifetimes in path on the AST. 2022-04-17 11:03:34 +02:00
rustc_builtin_macros Auto merge of #94468 - Amanieu:global_asm_sym, r=nagisa 2022-04-16 04:46:01 +00:00
rustc_codegen_cranelift Add new Deinit statement kind 2022-04-11 08:55:03 -04:00
rustc_codegen_gcc Auto merge of #95689 - lqd:self-profiler, r=wesleywiser 2022-04-16 11:43:28 +00:00
rustc_codegen_llvm Auto merge of #96117 - Dylan-DPC:rollup-5traczf, r=Dylan-DPC 2022-04-16 14:24:14 +00:00
rustc_codegen_ssa Auto merge of #96010 - eduardosm:Unique-on-top-of-NonNull, r=m-ou-se,tmiasko 2022-04-17 05:26:08 +00:00
rustc_const_eval Rollup merge of #95426 - b-naber:valtrees-slice, r=RalfJung,oli-obk 2022-04-16 19:42:03 +02:00
rustc_data_structures Auto merge of #95899 - petrochenkov:modchild2, r=cjgillot 2022-04-16 22:04:10 +00:00
rustc_driver errors: lazily load fallback fluent bundle 2022-04-13 02:44:59 +01:00
rustc_error_codes rework error messages for incorrect inherent impls 2022-03-30 11:23:58 +02:00
rustc_error_messages errors: lazily load fallback fluent bundle 2022-04-13 02:44:59 +01:00
rustc_errors Lint elided lifetimes in path on the AST. 2022-04-17 11:03:34 +02:00
rustc_expand Rollup merge of #96023 - matthiaskrgr:clippyper1304, r=lcnr 2022-04-16 14:25:56 +02:00
rustc_feature Rollup merge of #94457 - jhpratt:stabilize-derive_default_enum, r=davidtwco 2022-04-15 20:50:43 +02:00
rustc_fs_util Migrate to 2021 2021-09-20 22:21:42 -04:00
rustc_graphviz eplace usages of vec![].into_iter with [].into_iter 2022-01-09 14:09:25 +11:00
rustc_hir Auto merge of #95779 - cjgillot:ast-lifetimes-undeclared, r=petrochenkov 2022-04-17 12:56:19 +00:00
rustc_hir_pretty Reimplement lowering of sym operands for asm! so that it also works with global_asm! 2022-04-14 15:32:03 +01:00
rustc_incremental Auto merge of #95655 - kckeiks:create-hir-crate-items-query, r=cjgillot 2022-04-17 08:06:53 +00:00
rustc_index Spellchecking compiler comments 2022-03-30 15:14:15 -04:00
rustc_infer Rollup merge of #95908 - compiler-errors:shallow_resolve_ty-inline, r=oli-obk 2022-04-16 19:42:04 +02:00
rustc_interface Auto merge of #95655 - kckeiks:create-hir-crate-items-query, r=cjgillot 2022-04-17 08:06:53 +00:00
rustc_lexer Reduce max hash in raw strings from u16 to u8 2022-03-23 22:13:55 +01:00
rustc_lint Lint elided lifetimes in path on the AST. 2022-04-17 11:03:34 +02:00
rustc_lint_defs Lint elided lifetimes in path on the AST. 2022-04-17 11:03:34 +02:00
rustc_llvm Add codegen for global_asm! sym operands 2022-04-15 14:36:30 +01:00
rustc_log Make rustc_log doc test runnable 2022-01-03 22:31:56 -08:00
rustc_macros couple of clippy::complexity fixes 2022-04-13 22:51:34 +02:00
rustc_metadata Auto merge of #95655 - kckeiks:create-hir-crate-items-query, r=cjgillot 2022-04-17 08:06:53 +00:00
rustc_middle Auto merge of #95655 - kckeiks:create-hir-crate-items-query, r=cjgillot 2022-04-17 08:06:53 +00:00
rustc_mir_build Rollup merge of #96023 - matthiaskrgr:clippyper1304, r=lcnr 2022-04-16 14:25:56 +02:00
rustc_mir_dataflow Add new MutatatingUseContexts for deinit and SetDiscriminant 2022-04-11 09:26:26 -04:00
rustc_mir_transform couple of clippy::complexity fixes 2022-04-13 22:51:34 +02:00
rustc_monomorphize Auto merge of #95655 - kckeiks:create-hir-crate-items-query, r=cjgillot 2022-04-17 08:06:53 +00:00
rustc_parse Rollup merge of #95346 - Aaron1011:stablize-const-extern-fn, r=pnkfelix 2022-04-17 00:07:23 +02:00
rustc_parse_format Spellchecking compiler comments 2022-03-30 15:14:15 -04:00
rustc_passes Auto merge of #95655 - kckeiks:create-hir-crate-items-query, r=cjgillot 2022-04-17 08:06:53 +00:00
rustc_plugin_impl replace dynamic library module with libloading 2021-12-06 12:03:47 -05:00
rustc_privacy do use ty::Const in patterns and abstract consts 2022-04-02 12:20:59 +02:00
rustc_query_impl rework implementation for inherent impls for builtin types 2022-03-30 11:23:58 +02:00
rustc_query_system Remove NodeIdHashingMode. 2022-04-12 19:59:32 +02:00
rustc_resolve Lint elided lifetimes in path on the AST. 2022-04-17 11:03:34 +02:00
rustc_save_analysis remove find_use_placement 2022-03-31 17:20:03 -04:00
rustc_serialize errors: implement fallback diagnostic translation 2022-04-05 07:01:02 +01:00
rustc_session Rollup merge of #96026 - matthiaskrgr:clippy_compl_1304, r=Dylan-DPC 2022-04-15 20:50:47 +02:00
rustc_span Auto merge of #96016 - Aaron1011:hash-name-cleanup, r=cjgillot 2022-04-17 10:31:52 +00:00
rustc_symbol_mangling Auto merge of #95655 - kckeiks:create-hir-crate-items-query, r=cjgillot 2022-04-17 08:06:53 +00:00
rustc_target couple of clippy::complexity fixes 2022-04-13 22:51:34 +02:00
rustc_trait_selection Rollup merge of #96023 - matthiaskrgr:clippyper1304, r=lcnr 2022-04-16 14:25:56 +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 Avoid accessing HIR from MIR queries. 2022-04-10 13:08:36 +02:00
rustc_type_ir Revert "Auto merge of #93893 - oli-obk:sad_revert, r=oli-obk" 2022-03-28 16:27:14 +00:00
rustc_typeck Auto merge of #95379 - icewind1991:suggest-associated-type-more, r=jackh726 2022-04-19 01:59:35 +00:00