diff options
author | Aleksey Kladov <[email protected]> | 2020-06-28 12:11:41 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-06-28 12:11:41 +0100 |
commit | 7cf1981a2de0055f21cf1de9901e0460bae9691f (patch) | |
tree | b92dbcd7ade997bd6ca401d45c567a2909f6b196 /crates/ra_ide/src | |
parent | 0e0fb81f14c19252121985638bed8811ec51fa39 (diff) |
Don't show ra_fixture param hints
Diffstat (limited to 'crates/ra_ide/src')
-rw-r--r-- | crates/ra_ide/src/inlay_hints.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_ide/src/inlay_hints.rs b/crates/ra_ide/src/inlay_hints.rs index 3fd08b1e8..98fb34486 100644 --- a/crates/ra_ide/src/inlay_hints.rs +++ b/crates/ra_ide/src/inlay_hints.rs | |||
@@ -258,6 +258,7 @@ fn should_show_param_name_hint( | |||
258 | if param_name.is_empty() | 258 | if param_name.is_empty() |
259 | || Some(param_name) == fn_signature.name.as_ref().map(|s| s.trim_start_matches('_')) | 259 | || Some(param_name) == fn_signature.name.as_ref().map(|s| s.trim_start_matches('_')) |
260 | || is_argument_similar_to_param_name(sema, argument, param_name) | 260 | || is_argument_similar_to_param_name(sema, argument, param_name) |
261 | || param_name.starts_with("ra_fixture") | ||
261 | { | 262 | { |
262 | return false; | 263 | return false; |
263 | } | 264 | } |
@@ -270,7 +271,7 @@ fn should_show_param_name_hint( | |||
270 | 271 | ||
271 | // avoid displaying hints for common functions like map, filter, etc. | 272 | // avoid displaying hints for common functions like map, filter, etc. |
272 | // or other obvious words used in std | 273 | // or other obvious words used in std |
273 | parameters_len != 1 || !is_obvious_param(param_name) | 274 | !(parameters_len == 1 && is_obvious_param(param_name)) |
274 | } | 275 | } |
275 | 276 | ||
276 | fn is_argument_similar_to_param_name( | 277 | fn is_argument_similar_to_param_name( |