Skip to content

Commit 8e0a05e

Browse files
committed
feat(diagnostics): use default expression instead of todo! when missing fields
Signed-off-by: Benjamin Coenen <[email protected]>
1 parent b60a29c commit 8e0a05e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

crates/rust-analyzer/src/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ use crate::{
4545
// parsing the old name.
4646
config_data! {
4747
struct ConfigData {
48-
/// How assists will fill missing elements in an expression.
48+
/// Placeholder for missing expressions in assists.
4949
assist_exprFillDefault: ExprFillDefaultDef = "\"todo\"",
5050
/// How imports should be grouped into use statements.
5151
assist_importGranularity |
@@ -1272,7 +1272,7 @@ fn field_props(field: &str, ty: &str, doc: &[&str], default: &str) -> serde_json
12721272
"type": "string",
12731273
"enum": ["todo", "default"],
12741274
"enumDescriptions": [
1275-
"Fill missing expressions with the 'todo' macro",
1275+
"Fill missing expressions with the `todo` macro",
12761276
"Fill missing expressions with reasonable defaults, `new` or `default` constructors."
12771277
],
12781278
},

docs/user/generated_config.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[[rust-analyzer.assist.exprFillDefault]]rust-analyzer.assist.exprFillDefault (default: `"todo"`)::
22
+
33
--
4-
How assists will fill missing elements in an expression.
4+
Placeholder for missing expressions in assists.
55
--
66
[[rust-analyzer.assist.importGranularity]]rust-analyzer.assist.importGranularity (default: `"crate"`)::
77
+

editors/code/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -379,15 +379,15 @@
379379
},
380380
"$generated-start": {},
381381
"rust-analyzer.assist.exprFillDefault": {
382-
"markdownDescription": "How assists will fill missing elements in an expression.",
382+
"markdownDescription": "Placeholder for missing expressions in assists.",
383383
"default": "todo",
384384
"type": "string",
385385
"enum": [
386386
"todo",
387387
"default"
388388
],
389389
"enumDescriptions": [
390-
"Fill missing expressions with the 'todo' macro",
390+
"Fill missing expressions with the `todo` macro",
391391
"Fill missing expressions with reasonable defaults, `new` or `default` constructors."
392392
]
393393
},
@@ -1507,4 +1507,4 @@
15071507
]
15081508
}
15091509
}
1510-
}
1510+
}

0 commit comments

Comments
 (0)