about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Poveda <git@pvdrz.com>2022-04-25 23:49:53 +0200
committerChristian Poveda <git@pvdrz.com>2022-04-25 23:49:53 +0200
commit2e261a82f3ba99e6d11a35ead9da95007530187a (patch)
tree5e98784d7c3891af7eefbb3baa7c8adff29ac082
parent530f4dce291371e0b1d567b47a1888aa8c806410 (diff)
downloadrust-2e261a82f3ba99e6d11a35ead9da95007530187a.tar.gz
rust-2e261a82f3ba99e6d11a35ead9da95007530187a.zip
add `struct_warn` method
-rw-r--r--compiler/rustc_session/src/parse.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_session/src/parse.rs b/compiler/rustc_session/src/parse.rs
index dd7682ebace..e933fe1cb24 100644
--- a/compiler/rustc_session/src/parse.rs
+++ b/compiler/rustc_session/src/parse.rs
@@ -303,4 +303,8 @@ impl ParseSess {
     ) -> DiagnosticBuilder<'_, ErrorGuaranteed> {
         self.span_diagnostic.struct_err(msg)
     }
+
+    pub fn struct_warn(&self, msg: impl Into<DiagnosticMessage>) -> DiagnosticBuilder<'_, ()> {
+        self.span_diagnostic.struct_warn(msg)
+    }
 }