We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 909010e commit c8e8068Copy full SHA for c8e8068
compiler/rustc_mir_build/src/errors.rs
@@ -1150,6 +1150,9 @@ impl Subdiagnostic for Rust2024IncompatiblePatSugg {
1150
};
1151
format!("make the implied reference pattern{plural_derefs}{and_modes} explicit")
1152
1153
- diag.multipart_suggestion_verbose(msg, self.suggestion, applicability);
+ // FIXME(dianne): for peace of mind, don't risk emitting a 0-part suggestion (that panics!)
1154
+ if !self.suggestion.is_empty() {
1155
+ diag.multipart_suggestion_verbose(msg, self.suggestion, applicability);
1156
+ }
1157
}
1158
0 commit comments