diff --git a/compiler/rustc_session/src/session.rs b/compiler/rustc_session/src/session.rs index a988d7f28e6cb..151325fcb08a5 100644 --- a/compiler/rustc_session/src/session.rs +++ b/compiler/rustc_session/src/session.rs @@ -490,20 +490,6 @@ impl Session { } #[rustc_lint_diagnostics] #[track_caller] - pub fn span_err_or_warn>( - &self, - is_warning: bool, - sp: S, - msg: impl Into, - ) { - if is_warning { - self.span_warn(sp, msg); - } else { - self.span_err(sp, msg); - } - } - #[rustc_lint_diagnostics] - #[track_caller] pub fn span_err>( &self, sp: S,