1
Fork 0

New force_warn diagnostic builder and ensure cap-lints doesn't reduce force_warn level

This commit is contained in:
Ryan Levick 2021-07-01 12:29:20 +02:00
parent a3d6905053
commit 33cc7b1fe2
7 changed files with 67 additions and 15 deletions

View file

@ -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)
}