]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_hir_typeck/src/fn_ctxt/suggestions.rs
Auto merge of #105457 - GuillaumeGomez:prevent-auto-blanket-impl-retrieval, r=notriddle
[rust.git] / compiler / rustc_hir_typeck / src / fn_ctxt / suggestions.rs
index 1daca464b4772c2b07d4789a3c2286dd597ca18b..4f92477b5d87ef221239c71054742025efb7bf32 100644 (file)
@@ -32,11 +32,13 @@ pub(crate) fn body_fn_sig(&self) -> Option<ty::FnSig<'tcx>> {
     }
 
     pub(in super::super) fn suggest_semicolon_at_end(&self, span: Span, err: &mut Diagnostic) {
+        // This suggestion is incorrect for
+        // fn foo() -> bool { match () { () => true } || match () { () => true } }
         err.span_suggestion_short(
             span.shrink_to_hi(),
             "consider using a semicolon here",
             ";",
-            Applicability::MachineApplicable,
+            Applicability::MaybeIncorrect,
         );
     }