about summary refs log tree commit diff
path: root/src/librustc_errors
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-06-11 19:04:14 +0200
committerGitHub <noreply@github.com>2020-06-11 19:04:14 +0200
commitb34111591c6d70bb074e6812697b381048292c7b (patch)
treee9abbbaf7f79089c804d49cf23104e303d457328 /src/librustc_errors
parent8d620999de52ed62c16f6417d407b0f966e912fd (diff)
parent5541f689e9cfc6c1ccdb2277a308bc2e8541ab5e (diff)
downloadrust-b34111591c6d70bb074e6812697b381048292c7b.tar.gz
rust-b34111591c6d70bb074e6812697b381048292c7b.zip
Rollup merge of #73169 - Amanieu:asm-warnings, r=petrochenkov
Handle assembler warnings properly

Previously all inline asm diagnostics were treated as errors, but LLVM sometimes emits warnings and notes as well.

Fixes #73160

r? @petrochenkov
Diffstat (limited to 'src/librustc_errors')
-rw-r--r--src/librustc_errors/lib.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/librustc_errors/lib.rs b/src/librustc_errors/lib.rs
index e4a560e434a..7261c638ce0 100644
--- a/src/librustc_errors/lib.rs
+++ b/src/librustc_errors/lib.rs
@@ -581,6 +581,11 @@ impl Handler {
         DiagnosticBuilder::new(self, Level::Help, msg)
     }
 
+    /// Construct a builder at the `Note` level with the `msg`.
+    pub fn struct_note_without_error(&self, msg: &str) -> DiagnosticBuilder<'_> {
+        DiagnosticBuilder::new(self, Level::Note, msg)
+    }
+
     pub fn span_fatal(&self, span: impl Into<MultiSpan>, msg: &str) -> FatalError {
         self.emit_diag_at_span(Diagnostic::new(Fatal, msg), span);
         FatalError