Skip to content

Commit

Permalink
session: diagnostic migration lint on more fns
Browse files Browse the repository at this point in the history
Apply the diagnostic migration lint to more functions on `Session`.

Signed-off-by: David Wood <[email protected]>
  • Loading branch information
davidtwco committed Aug 22, 2022
1 parent a8a33cf commit e91cd39
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions compiler/rustc_session/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -525,9 +525,11 @@ impl Session {
Err(ErrorGuaranteed::unchecked_claim_error_was_emitted())
}
}
#[rustc_lint_diagnostics]
pub fn span_warn<S: Into<MultiSpan>>(&self, sp: S, msg: impl Into<DiagnosticMessage>) {
self.diagnostic().span_warn(sp, msg)
}
#[rustc_lint_diagnostics]
pub fn span_warn_with_code<S: Into<MultiSpan>>(
&self,
sp: S,
Expand All @@ -536,6 +538,7 @@ impl Session {
) {
self.diagnostic().span_warn_with_code(sp, msg, code)
}
#[rustc_lint_diagnostics]
pub fn warn(&self, msg: impl Into<DiagnosticMessage>) {
self.diagnostic().warn(msg)
}
Expand Down Expand Up @@ -566,16 +569,19 @@ impl Session {
self.diagnostic().delay_good_path_bug(msg)
}

#[rustc_lint_diagnostics]
pub fn note_without_error(&self, msg: impl Into<DiagnosticMessage>) {
self.diagnostic().note_without_error(msg)
}
#[rustc_lint_diagnostics]
pub fn span_note_without_error<S: Into<MultiSpan>>(
&self,
sp: S,
msg: impl Into<DiagnosticMessage>,
) {
self.diagnostic().span_note_without_error(sp, msg)
}
#[rustc_lint_diagnostics]
pub fn struct_note_without_error(
&self,
msg: impl Into<DiagnosticMessage>,
Expand Down

0 comments on commit e91cd39

Please sign in to comment.