From c87b860d3db771cbe3649956113d64697744dd05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Sommer?= Date: Thu, 9 Sep 2021 17:48:51 +0200 Subject: [PATCH] Use `todo!()` instead of `()` for missing fields The generated code with `()` doesn't compile in most of the cases. To signal the developer there's something to do, fill in `todo!()`. Because the file *missing_fields.rs* contains the string `todo!()` it needs an exception for the test *check_todo*. --- .../src/handlers/missing_fields.rs | 20 +++++++++---------- crates/rust-analyzer/tests/slow-tests/tidy.rs | 2 ++ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/crates/ide_diagnostics/src/handlers/missing_fields.rs b/crates/ide_diagnostics/src/handlers/missing_fields.rs index f61ab1f410..03656ad925 100644 --- a/crates/ide_diagnostics/src/handlers/missing_fields.rs +++ b/crates/ide_diagnostics/src/handlers/missing_fields.rs @@ -69,10 +69,10 @@ fn fixes(ctx: &DiagnosticsContext<'_>, d: &hir::MissingFields) -> Option