mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 02:03:53 +00:00
Code review fixes
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
This commit is contained in:
parent
66882f1a24
commit
30817de3af
@ -263,14 +263,13 @@ fn is_argument_similar_to_param_name(
|
|||||||
) -> bool {
|
) -> bool {
|
||||||
if is_enum_name_similar_to_param_name(sema, argument, param_name) {
|
if is_enum_name_similar_to_param_name(sema, argument, param_name) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
}
|
||||||
let argument_string = if let Some(repr) = get_string_representation(argument) {
|
match get_string_representation(argument) {
|
||||||
repr
|
None => false,
|
||||||
} else {
|
Some(repr) => {
|
||||||
return false;
|
let argument_string = repr.trim_start_matches('_');
|
||||||
};
|
argument_string.starts_with(param_name) || argument_string.ends_with(param_name)
|
||||||
let argument_string = argument_string.trim_start_matches('_');
|
}
|
||||||
argument_string.starts_with(param_name) || argument_string.ends_with(param_name)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user