We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b32a533 commit 8dcdb3eCopy full SHA for 8dcdb3e
compiler/rustc_mir_build/src/errors.rs
@@ -1159,6 +1159,9 @@ impl Subdiagnostic for Rust2024IncompatiblePatSugg {
1159
};
1160
format!("make the implied reference pattern{plural_derefs}{and_modes} explicit")
1161
1162
- diag.multipart_suggestion_verbose(msg, self.suggestion, applicability);
+ // FIXME(dianne): for peace of mind, don't risk emitting a 0-part suggestion (that panics!)
1163
+ if !self.suggestion.is_empty() {
1164
+ diag.multipart_suggestion_verbose(msg, self.suggestion, applicability);
1165
+ }
1166
}
1167
0 commit comments