From 7cf1981a2de0055f21cf1de9901e0460bae9691f Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 28 Jun 2020 13:11:41 +0200 Subject: Don't show ra_fixture param hints --- crates/ra_ide/src/inlay_hints.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crates/ra_ide/src') 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( if param_name.is_empty() || Some(param_name) == fn_signature.name.as_ref().map(|s| s.trim_start_matches('_')) || is_argument_similar_to_param_name(sema, argument, param_name) + || param_name.starts_with("ra_fixture") { return false; } @@ -270,7 +271,7 @@ fn should_show_param_name_hint( // avoid displaying hints for common functions like map, filter, etc. // or other obvious words used in std - parameters_len != 1 || !is_obvious_param(param_name) + !(parameters_len == 1 && is_obvious_param(param_name)) } fn is_argument_similar_to_param_name( -- cgit v1.2.3