]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_lint/src/context.rs
Add 'compiler/rustc_codegen_gcc/' from commit 'afae271d5d3719eeb92c18bc004bb6d1965a5f3f'
[rust.git] / compiler / rustc_lint / src / context.rs
index ad8a41a56cc16287799824e5ea34ed0bb6dad769..4a646013ff89166a51d5f2fff2a4e4704fc274ef 100644 (file)
@@ -750,6 +750,14 @@ fn lookup_with_diagnostics(
                         db.note(&format!("to ignore the value produced by the macro, add a semicolon after the invocation of `{name}`"));
                     }
                 }
+                BuiltinLintDiagnostics::BreakWithLabelAndLoop(span) => {
+                    db.multipart_suggestion(
+                        "wrap this expression in parentheses",
+                        vec![(span.shrink_to_lo(), "(".to_string()),
+                             (span.shrink_to_hi(), ")".to_string())],
+                        Applicability::MachineApplicable
+                    );
+                }
             }
             // Rewrap `db`, and pass control to the user.
             decorate(LintDiagnosticBuilder::new(db));