File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
crates/ide/src/inlay_hints Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -124,12 +124,12 @@ fn should_hide_param_name_hint(
124124 // hide when:
125125 // - the parameter name is a suffix of the function's name
126126 // - the argument is a qualified constructing or call expression where the qualifier is an ADT
127- // - exact argument<->parameter match(ignoring leading underscore) or parameter is a prefix/suffix
128- // of argument with _ splitting it off
127+ // - exact argument<->parameter match(ignoring leading and trailing underscore) or
128+ // parameter is a prefix/suffix of argument with _ splitting it off
129129 // - param starts with `ra_fixture`
130130 // - param is a well known name in a unary function
131131
132- let param_name = param_name. trim_start_matches ( '_' ) ;
132+ let param_name = param_name. trim_matches ( '_' ) ;
133133 if param_name. is_empty ( ) {
134134 return true ;
135135 }
@@ -540,6 +540,8 @@ fn enum_matches_param_name(completion_kind: CompletionKind) {}
540540fn foo(param: u32) {}
541541fn bar(param_eter: u32) {}
542542fn baz(a_d_e: u32) {}
543+ fn far(loop_: u32) {}
544+ fn faz(r#loop: u32) {}
543545
544546enum CompletionKind {
545547 Keyword,
@@ -590,6 +592,9 @@ fn main() {
590592 let param_eter2 = 0;
591593 bar(param_eter2);
592594 //^^^^^^^^^^^ param_eter
595+ let loop_level = 0;
596+ far(loop_level);
597+ faz(loop_level);
593598
594599 non_ident_pat((0, 0));
595600
You can’t perform that action at this time.
0 commit comments