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
1 changed files with 3 additions and 2 deletions
|
@ -1571,9 +1571,10 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
|
|||
{
|
||||
// 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…
Add table
Reference in a new issue