rust/compiler/rustc_middle/src
Matthias Krüger f8b83a2aa6
Rollup merge of #89892 - Nilstrieb:suggest-return-impl-trait, r=jackh726
Suggest `impl Trait` return type when incorrectly using a generic return type

Address #85991

When there is a type mismatch error and the return type is generic, and that generic parameter is not used in the function parameters, suggest replacing that generic with the `impl Trait` syntax.

r? `@estebank`
2022-02-18 23:23:02 +01:00
..
dep_graph Adopt let_else in even more places 2022-02-16 22:43:39 +01:00
hir Make all hir::Map methods consistently by-value 2022-02-10 11:54:06 +01:00
infer Inline UnifyKey::index and UnifyKey::from_index 2022-02-15 19:07:06 +01:00
middle Rollup merge of #93634 - matthiaskrgr:clippy_complexity_jan_2022, r=oli-obk 2022-02-18 16:23:33 +01:00
mir Rollup merge of #94020 - tmiasko:pp, r=oli-obk 2022-02-16 18:59:32 +01:00
query Support pretty printing of invalid constants 2022-02-16 00:38:59 +01:00
thir use AllocId and Ty in ExprKind::StaticRef and delay ConstValue construction 2022-02-15 21:18:33 +01:00
traits Suggest copying trait associated type bounds on lifetime error 2022-02-17 14:09:21 -05:00
ty Rollup merge of #89892 - Nilstrieb:suggest-return-impl-trait, r=jackh726 2022-02-18 23:23:02 +01:00
util Use AddAssign impl 2021-11-09 23:47:36 +01:00
arena.rs Overhaul Const. 2022-02-15 16:19:59 +11:00
lib.rs add a rustc::query_stability lint 2022-02-01 10:15:59 +01:00
lint.rs update FutureIncompatibilityReason 2022-02-01 09:55:19 +01:00
macros.rs Rename TypeFolderFallible to FallibleTypeFolder 2021-12-02 16:14:18 +00:00
metadata.rs rustc_middle: Rename Export to ModChild and add some comments 2022-01-09 09:22:07 +08:00
tests.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
thir.rs try to bless 32bit mir tests manually 2022-02-15 22:24:53 +01:00