diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-06-28 12:14:36 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-06-28 12:14:36 +0100 |
commit | 117cf0b85bc8022a939fe43054f64aaa35117dd9 (patch) | |
tree | b92dbcd7ade997bd6ca401d45c567a2909f6b196 /crates/ra_ide | |
parent | 0e0fb81f14c19252121985638bed8811ec51fa39 (diff) | |
parent | 7cf1981a2de0055f21cf1de9901e0460bae9691f (diff) |
Merge #5108
5108: Don't show ra_fixture param hints r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide')
-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( |