Skip to content

Commit f1dbc2a

Browse files
bors[bot]Veykril
andauthored
Merge #11789
11789: fix: Fix lifetime elision hint configuration key r=Veykril a=Veykril This is inconsistent with the other configuration keys unfortunately, but this is an issue of how we structured them here in general. I feel like we'll have to do a proper pass over all the configs, check them for consistency and then write down some documentation of how our configs should be laid out, then apply fixes to the inconsistencies all at once which will entail breaking some user configurations unfortunately since we won't be able to do proper fallback handling for some of these. Fixes #11778 bors r+ Co-authored-by: Lukas Wirth <[email protected]>
2 parents 800ae51 + ecf2c98 commit f1dbc2a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

crates/rust-analyzer/src/config.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ config_data! {
259259
/// Whether to show inlay type hints for compiler inserted reborrows.
260260
inlayHints_reborrowHints: bool = "false",
261261
/// Whether to show inlay type hints for elided lifetimes in function signatures.
262-
inlayHints_lifetimeElisionHints: LifetimeElisionDef = "\"never\"",
262+
inlayHints_lifetimeElisionHints_enable: LifetimeElisionDef = "\"never\"",
263263
/// Whether to prefer using parameter names as the name for elided lifetime hints if possible.
264264
inlayHints_lifetimeElisionHints_useParameterNames: bool = "false",
265265
/// Whether to hide inlay hints for constructors.
@@ -862,7 +862,7 @@ impl Config {
862862
parameter_hints: self.data.inlayHints_parameterHints,
863863
chaining_hints: self.data.inlayHints_chainingHints,
864864
closure_return_type_hints: self.data.inlayHints_closureReturnTypeHints,
865-
lifetime_elision_hints: match self.data.inlayHints_lifetimeElisionHints {
865+
lifetime_elision_hints: match self.data.inlayHints_lifetimeElisionHints_enable {
866866
LifetimeElisionDef::Always => LifetimeElisionHints::Always,
867867
LifetimeElisionDef::Never => LifetimeElisionHints::Never,
868868
LifetimeElisionDef::SkipTrivial => LifetimeElisionHints::SkipTrivial,

docs/user/generated_config.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ Whether to show inlay type hints for return types of closures with blocks.
383383
--
384384
Whether to show inlay type hints for compiler inserted reborrows.
385385
--
386-
[[rust-analyzer.inlayHints.lifetimeElisionHints]]rust-analyzer.inlayHints.lifetimeElisionHints (default: `"never"`)::
386+
[[rust-analyzer.inlayHints.lifetimeElisionHints.enable]]rust-analyzer.inlayHints.lifetimeElisionHints.enable (default: `"never"`)::
387387
+
388388
--
389389
Whether to show inlay type hints for elided lifetimes in function signatures.

editors/code/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@
800800
"default": false,
801801
"type": "boolean"
802802
},
803-
"rust-analyzer.inlayHints.lifetimeElisionHints": {
803+
"rust-analyzer.inlayHints.lifetimeElisionHints.enable": {
804804
"markdownDescription": "Whether to show inlay type hints for elided lifetimes in function signatures.",
805805
"default": "never",
806806
"type": "string",

0 commit comments

Comments
 (0)