Improve suggestion to rename type starting with underscore to make it more obvious what is actually suggested
This commit is contained in:
parent
632d26aeff
commit
3770cf7abf
@ -1571,9 +1571,10 @@ pub(crate) fn add_typo_suggestion(
|
||||
{
|
||||
// When the suggested binding change would be from `x` to `_x`, suggest changing the
|
||||
// original binding definition instead. (#60164)
|
||||
(span, snippet, ", consider changing it")
|
||||
let post = format!(", consider renaming `{}` into `{snippet}`", suggestion.candidate);
|
||||
(span, snippet, post)
|
||||
} else {
|
||||
(span, suggestion.candidate.to_string(), "")
|
||||
(span, suggestion.candidate.to_string(), String::new())
|
||||
};
|
||||
let msg = match suggestion.target {
|
||||
SuggestionTarget::SimilarlyNamed => format!(
|
||||
|
Loading…
Reference in New Issue
Block a user