about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBenjamin Coenen <5719034+bnjjj@users.noreply.github.com>2022-01-07 15:01:37 +0100
committerBenjamin Coenen <5719034+bnjjj@users.noreply.github.com>2022-01-07 15:01:37 +0100
commit8e0a05eb70d2a3506e1441fb491c0f8b6ae4ac59 (patch)
tree56a987c1f5453e2ed3c364331ba0aec4f95c1221
parentb60a29ca9428e95c995f12ab8eff6160957188fe (diff)
downloadrust-8e0a05eb70d2a3506e1441fb491c0f8b6ae4ac59.tar.gz
rust-8e0a05eb70d2a3506e1441fb491c0f8b6ae4ac59.zip
feat(diagnostics): use default expression instead of todo! when missing fields
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
-rw-r--r--crates/rust-analyzer/src/config.rs4
-rw-r--r--docs/user/generated_config.adoc2
-rw-r--r--editors/code/package.json6
3 files changed, 6 insertions, 6 deletions
diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs
index 6be889df67a..449402da459 100644
--- a/crates/rust-analyzer/src/config.rs
+++ b/crates/rust-analyzer/src/config.rs
@@ -45,7 +45,7 @@ use crate::{
 // parsing the old name.
 config_data! {
     struct ConfigData {
-        /// How assists will fill missing elements in an expression.
+        /// Placeholder for missing expressions in assists.
         assist_exprFillDefault: ExprFillDefaultDef              = "\"todo\"",
         /// How imports should be grouped into use statements.
         assist_importGranularity |
@@ -1272,7 +1272,7 @@ fn field_props(field: &str, ty: &str, doc: &[&str], default: &str) -> serde_json
             "type": "string",
             "enum": ["todo", "default"],
             "enumDescriptions": [
-                "Fill missing expressions with the 'todo' macro",
+                "Fill missing expressions with the `todo` macro",
                 "Fill missing expressions with reasonable defaults, `new` or `default` constructors."
             ],
         },
diff --git a/docs/user/generated_config.adoc b/docs/user/generated_config.adoc
index 28350374d13..179e81cd363 100644
--- a/docs/user/generated_config.adoc
+++ b/docs/user/generated_config.adoc
@@ -1,7 +1,7 @@
 [[rust-analyzer.assist.exprFillDefault]]rust-analyzer.assist.exprFillDefault (default: `"todo"`)::
 +
 --
-How assists will fill missing elements in an expression.
+Placeholder for missing expressions in assists.
 --
 [[rust-analyzer.assist.importGranularity]]rust-analyzer.assist.importGranularity (default: `"crate"`)::
 +
diff --git a/editors/code/package.json b/editors/code/package.json
index c81fd0b3d2d..aaf5d49b715 100644
--- a/editors/code/package.json
+++ b/editors/code/package.json
@@ -379,7 +379,7 @@
                 },
                 "$generated-start": {},
                 "rust-analyzer.assist.exprFillDefault": {
-                    "markdownDescription": "How assists will fill missing elements in an expression.",
+                    "markdownDescription": "Placeholder for missing expressions in assists.",
                     "default": "todo",
                     "type": "string",
                     "enum": [
@@ -387,7 +387,7 @@
                         "default"
                     ],
                     "enumDescriptions": [
-                        "Fill missing expressions with the 'todo' macro",
+                        "Fill missing expressions with the `todo` macro",
                         "Fill missing expressions with reasonable defaults, `new` or `default` constructors."
                     ]
                 },
@@ -1507,4 +1507,4 @@
             ]
         }
     }
-}
\ No newline at end of file
+}