about summary refs log tree commit diff
path: root/compiler/rustc_session
diff options
context:
space:
mode:
authorRyan Levick <me@ryanlevick.com>2021-07-01 12:29:20 +0200
committerRyan Levick <me@ryanlevick.com>2021-07-01 12:29:20 +0200
commit33cc7b1fe21c82d31204e549cd2471ac8ec22aa3 (patch)
tree6f60870bfaaaa7c5377f11f33b0dc9b84d9bda46 /compiler/rustc_session
parenta3d6905053ad60e836717976e6e4d38de67888f9 (diff)
downloadrust-33cc7b1fe21c82d31204e549cd2471ac8ec22aa3.tar.gz
rust-33cc7b1fe21c82d31204e549cd2471ac8ec22aa3.zip
New force_warn diagnostic builder and ensure cap-lints doesn't reduce force_warn level
Diffstat (limited to 'compiler/rustc_session')
-rw-r--r--compiler/rustc_session/src/session.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs
index 2bcb7c94d53..f6b7797c2e3 100644
--- a/compiler/rustc_session/src/session.rs
+++ b/compiler/rustc_session/src/session.rs
@@ -369,6 +369,13 @@ impl Session {
     pub fn struct_span_warn<S: Into<MultiSpan>>(&self, sp: S, msg: &str) -> DiagnosticBuilder<'_> {
         self.diagnostic().struct_span_warn(sp, msg)
     }
+    pub fn struct_span_force_warn<S: Into<MultiSpan>>(
+        &self,
+        sp: S,
+        msg: &str,
+    ) -> DiagnosticBuilder<'_> {
+        self.diagnostic().struct_span_force_warn(sp, msg)
+    }
     pub fn struct_span_warn_with_code<S: Into<MultiSpan>>(
         &self,
         sp: S,
@@ -380,6 +387,9 @@ impl Session {
     pub fn struct_warn(&self, msg: &str) -> DiagnosticBuilder<'_> {
         self.diagnostic().struct_warn(msg)
     }
+    pub fn struct_force_warn(&self, msg: &str) -> DiagnosticBuilder<'_> {
+        self.diagnostic().struct_force_warn(msg)
+    }
     pub fn struct_span_allow<S: Into<MultiSpan>>(&self, sp: S, msg: &str) -> DiagnosticBuilder<'_> {
         self.diagnostic().struct_span_allow(sp, msg)
     }