@@ -32,6 +32,7 @@ mod fn_lifetime_fn;
3232mod implicit_static;
3333mod param_name;
3434mod implicit_drop;
35+ mod range_exclusive;
3536
3637#[ derive( Clone , Debug , PartialEq , Eq ) ]
3738pub struct InlayHintsConfig {
@@ -51,6 +52,7 @@ pub struct InlayHintsConfig {
5152 pub param_names_for_lifetime_elision_hints : bool ,
5253 pub hide_named_constructor_hints : bool ,
5354 pub hide_closure_initialization_hints : bool ,
55+ pub range_exclusive_hints : bool ,
5456 pub closure_style : ClosureStyle ,
5557 pub max_length : Option < usize > ,
5658 pub closing_brace_hints_min_lines : Option < usize > ,
@@ -127,6 +129,7 @@ pub enum InlayKind {
127129 Parameter ,
128130 Type ,
129131 Drop ,
132+ RangeExclusive ,
130133}
131134
132135#[ derive( Debug ) ]
@@ -517,13 +520,20 @@ fn hints(
517520 closure_captures:: hints( hints, famous_defs, config, file_id, it. clone( ) ) ;
518521 closure_ret:: hints( hints, famous_defs, config, file_id, it)
519522 } ,
523+ ast:: Expr :: RangeExpr ( it) => range_exclusive:: hints( hints, config, it) ,
520524 _ => None ,
521525 }
522526 } ,
523527 ast:: Pat ( it) => {
524528 binding_mode:: hints( hints, sema, config, & it) ;
525- if let ast:: Pat :: IdentPat ( it) = it {
526- bind_pat:: hints( hints, famous_defs, config, file_id, & it) ;
529+ match it {
530+ ast:: Pat :: IdentPat ( it) => {
531+ bind_pat:: hints( hints, famous_defs, config, file_id, & it) ;
532+ }
533+ ast:: Pat :: RangePat ( it) => {
534+ range_exclusive:: hints( hints, config, it) ;
535+ }
536+ _ => { }
527537 }
528538 Some ( ( ) )
529539 } ,
@@ -621,6 +631,7 @@ mod tests {
621631 closing_brace_hints_min_lines : None ,
622632 fields_to_resolve : InlayFieldsToResolve :: empty ( ) ,
623633 implicit_drop_hints : false ,
634+ range_exclusive_hints : false ,
624635 } ;
625636 pub ( super ) const TEST_CONFIG : InlayHintsConfig = InlayHintsConfig {
626637 type_hints : true ,
0 commit comments