peace of mind: be absolutely sure we don't try to emit a 0-part suggestion
(cherry picked from commit 8dcdb3eb3c)
This commit is contained in:
parent
909010ebe6
commit
c8e8068fe9
1 changed files with 4 additions and 1 deletions
|
|
@ -1150,6 +1150,9 @@ impl Subdiagnostic for Rust2024IncompatiblePatSugg {
|
|||
};
|
||||
format!("make the implied reference pattern{plural_derefs}{and_modes} explicit")
|
||||
};
|
||||
diag.multipart_suggestion_verbose(msg, self.suggestion, applicability);
|
||||
// FIXME(dianne): for peace of mind, don't risk emitting a 0-part suggestion (that panics!)
|
||||
if !self.suggestion.is_empty() {
|
||||
diag.multipart_suggestion_verbose(msg, self.suggestion, applicability);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue