tweak pass description and fix lint fail post-rebase

This commit is contained in:
Arthur Lafrance 2023-10-16 01:17:52 -07:00
parent 5895102c4d
commit 52ad8199d5
2 changed files with 2 additions and 2 deletions

View File

@ -541,7 +541,7 @@ impl LateLintPass<'_> for BadOptAccess {
declare_tool_lint! {
pub rustc::SPAN_USE_EQ_CTXT,
Allow,
"Use of `==` with `Span::ctxt` rather than `Span::eq_ctxt`",
"forbid uses of `==` with `Span::ctxt`, suggest `Span::eq_ctxt` instead",
report_in_external_macro: true
}

View File

@ -231,7 +231,7 @@ impl<'a, 'hir> CheckLoopVisitor<'a, 'hir> {
AsyncClosure(closure_span) => {
self.sess.emit_err(BreakInsideAsyncBlock { span, closure_span, name });
}
UnlabeledBlock(block_span) if is_break && block_span.ctxt() == break_span.ctxt() => {
UnlabeledBlock(block_span) if is_break && block_span.eq_ctxt(break_span) => {
let suggestion = Some(OutsideLoopSuggestion { block_span, break_span });
self.sess.emit_err(OutsideLoop { span, name, is_break, suggestion });
}