From 1316422a7c2ef26e9da78fa23f170407b1cb39bb Mon Sep 17 00:00:00 2001 From: Phil Ellison Date: Mon, 28 Dec 2020 13:41:15 +0000 Subject: Add diagnostic for filter_map followed by next --- crates/hir/src/diagnostics.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'crates/hir') diff --git a/crates/hir/src/diagnostics.rs b/crates/hir/src/diagnostics.rs index 447faa04f..f7fd3e237 100644 --- a/crates/hir/src/diagnostics.rs +++ b/crates/hir/src/diagnostics.rs @@ -5,5 +5,14 @@ pub use hir_expand::diagnostics::{ }; pub use hir_ty::diagnostics::{ IncorrectCase, MismatchedArgCount, MissingFields, MissingMatchArms, MissingOkOrSomeInTailExpr, - NoSuchField, RemoveThisSemicolon, + NoSuchField, RemoveThisSemicolon, ReplaceFilterMapNextWithFindMap, }; + +// PHIL: +// hir/src/diagnostics.rs - just pub uses the type from hir_ty::diagnostics (DONE) +// hir_ty/src/diagnostics.rs - defines the type (DONE) +// hir_ty/src/diagnostics.rs - plus a test (DONE) <--- one example found, need to copy the not-applicable tests from the assist version +// ide/src/diagnostics.rs - define handler for when this diagnostic is raised (DONE) + +// ide/src/diagnostics/fixes.rs - pulls in type from hir, and impls DiagnosticWithFix (TODO) +// hir_ty/src/diagnostics/expr.rs - do the real work (TODO) -- cgit v1.2.3