@@ -31,7 +31,6 @@ mod discriminant;
31
31
32
32
#[ derive( Clone , Debug , PartialEq , Eq ) ]
33
33
pub struct InlayHintsConfig {
34
- pub location_links : bool ,
35
34
pub render_colons : bool ,
36
35
pub type_hints : bool ,
37
36
pub discriminant_hints : DiscriminantHints ,
@@ -240,7 +239,6 @@ struct InlayHintLabelBuilder<'a> {
240
239
db : & ' a RootDatabase ,
241
240
result : InlayHintLabel ,
242
241
last_part : String ,
243
- location_link_enabled : bool ,
244
242
location : Option < FileRange > ,
245
243
}
246
244
@@ -252,9 +250,6 @@ impl fmt::Write for InlayHintLabelBuilder<'_> {
252
250
253
251
impl HirWrite for InlayHintLabelBuilder < ' _ > {
254
252
fn start_location_link ( & mut self , def : ModuleDefId ) {
255
- if !self . location_link_enabled {
256
- return ;
257
- }
258
253
if self . location . is_some ( ) {
259
254
never ! ( "location link is already started" ) ;
260
255
}
@@ -266,9 +261,6 @@ impl HirWrite for InlayHintLabelBuilder<'_> {
266
261
}
267
262
268
263
fn end_location_link ( & mut self ) {
269
- if !self . location_link_enabled {
270
- return ;
271
- }
272
264
self . make_new_part ( ) ;
273
265
}
274
266
}
@@ -334,7 +326,6 @@ fn label_of_ty(
334
326
db : sema. db ,
335
327
last_part : String :: new ( ) ,
336
328
location : None ,
337
- location_link_enabled : config. location_links ,
338
329
result : InlayHintLabel :: default ( ) ,
339
330
} ;
340
331
let _ = rec ( sema, famous_defs, config. max_length , ty, & mut label_builder) ;
@@ -495,7 +486,6 @@ mod tests {
495
486
use super :: ClosureReturnTypeHints ;
496
487
497
488
pub ( super ) const DISABLED_CONFIG : InlayHintsConfig = InlayHintsConfig {
498
- location_links : false ,
499
489
discriminant_hints : DiscriminantHints :: Never ,
500
490
render_colons : false ,
501
491
type_hints : false ,
@@ -513,16 +503,14 @@ mod tests {
513
503
max_length : None ,
514
504
closing_brace_hints_min_lines : None ,
515
505
} ;
516
- pub ( super ) const DISABLED_CONFIG_WITH_LINKS : InlayHintsConfig =
517
- InlayHintsConfig { location_links : true , ..DISABLED_CONFIG } ;
518
506
pub ( super ) const TEST_CONFIG : InlayHintsConfig = InlayHintsConfig {
519
507
type_hints : true ,
520
508
parameter_hints : true ,
521
509
chaining_hints : true ,
522
510
closure_return_type_hints : ClosureReturnTypeHints :: WithBlock ,
523
511
binding_mode_hints : true ,
524
512
lifetime_elision_hints : LifetimeElisionHints :: Always ,
525
- ..DISABLED_CONFIG_WITH_LINKS
513
+ ..DISABLED_CONFIG
526
514
} ;
527
515
528
516
#[ track_caller]
0 commit comments