Module param_name

Module param_name 

Source
Expand description

Implementation of “param name” inlay hints:

fn max(x: i32, y: i32) -> i32 { x + y }
_ = max(/*x*/4, /*y*/4);

Constants§

INSIGNIFICANT_METHOD_NAMES 🔒
INSIGNIFICANT_PARAMETER_NAMES 🔒

Functions§

get_callable 🔒
get_segment_representation 🔒
hints 🔒
is_adt_constructor_similar_to_param_name 🔒
is_argument_expr_similar_to_param_name 🔒
is_argument_similar_to_param_name 🔒
Check whether param_name and argument are the same or whether param_name is a prefix/suffix of argument(split at _).
is_obvious_param 🔒
is_param_name_suffix_of_fn_name 🔒
Hide the parameter name of a unary function if it is a _ - prefixed suffix of the function’s name, or equal.
missing_arg_hint_position 🔒
Determines the position where the hint for a missing argument should be placed. Returns the range of the token where the hint should appear.
should_hide_missing_param_hint 🔒
Determines whether to hide the parameter hint for a missing argument. This is a simplified version of should_hide_param_name_hint that doesn’t require an actual argument expression.
should_hide_param_name_hint 🔒