@@ -31,7 +31,6 @@ mod discriminant;
3131
3232#[ derive( Clone , Debug , PartialEq , Eq ) ]
3333pub struct InlayHintsConfig {
34- pub location_links : bool ,
3534 pub render_colons : bool ,
3635 pub type_hints : bool ,
3736 pub discriminant_hints : DiscriminantHints ,
@@ -240,7 +239,6 @@ struct InlayHintLabelBuilder<'a> {
240239 db : & ' a RootDatabase ,
241240 result : InlayHintLabel ,
242241 last_part : String ,
243- location_link_enabled : bool ,
244242 location : Option < FileRange > ,
245243}
246244
@@ -252,9 +250,6 @@ impl fmt::Write for InlayHintLabelBuilder<'_> {
252250
253251impl HirWrite for InlayHintLabelBuilder < ' _ > {
254252 fn start_location_link ( & mut self , def : ModuleDefId ) {
255- if !self . location_link_enabled {
256- return ;
257- }
258253 if self . location . is_some ( ) {
259254 never ! ( "location link is already started" ) ;
260255 }
@@ -266,9 +261,6 @@ impl HirWrite for InlayHintLabelBuilder<'_> {
266261 }
267262
268263 fn end_location_link ( & mut self ) {
269- if !self . location_link_enabled {
270- return ;
271- }
272264 self . make_new_part ( ) ;
273265 }
274266}
@@ -334,7 +326,6 @@ fn label_of_ty(
334326 db : sema. db ,
335327 last_part : String :: new ( ) ,
336328 location : None ,
337- location_link_enabled : config. location_links ,
338329 result : InlayHintLabel :: default ( ) ,
339330 } ;
340331 let _ = rec ( sema, famous_defs, config. max_length , ty, & mut label_builder) ;
@@ -495,7 +486,6 @@ mod tests {
495486 use super :: ClosureReturnTypeHints ;
496487
497488 pub ( super ) const DISABLED_CONFIG : InlayHintsConfig = InlayHintsConfig {
498- location_links : false ,
499489 discriminant_hints : DiscriminantHints :: Never ,
500490 render_colons : false ,
501491 type_hints : false ,
@@ -513,16 +503,14 @@ mod tests {
513503 max_length : None ,
514504 closing_brace_hints_min_lines : None ,
515505 } ;
516- pub ( super ) const DISABLED_CONFIG_WITH_LINKS : InlayHintsConfig =
517- InlayHintsConfig { location_links : true , ..DISABLED_CONFIG } ;
518506 pub ( super ) const TEST_CONFIG : InlayHintsConfig = InlayHintsConfig {
519507 type_hints : true ,
520508 parameter_hints : true ,
521509 chaining_hints : true ,
522510 closure_return_type_hints : ClosureReturnTypeHints :: WithBlock ,
523511 binding_mode_hints : true ,
524512 lifetime_elision_hints : LifetimeElisionHints :: Always ,
525- ..DISABLED_CONFIG_WITH_LINKS
513+ ..DISABLED_CONFIG
526514 } ;
527515
528516 #[ track_caller]
0 commit comments