Skip to content

Commit 52ad819

Browse files
committed
tweak pass description and fix lint fail post-rebase
1 parent 5895102 commit 52ad819

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/rustc_lint/src/internal.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ impl LateLintPass<'_> for BadOptAccess {
541541
declare_tool_lint! {
542542
pub rustc::SPAN_USE_EQ_CTXT,
543543
Allow,
544-
"Use of `==` with `Span::ctxt` rather than `Span::eq_ctxt`",
544+
"forbid uses of `==` with `Span::ctxt`, suggest `Span::eq_ctxt` instead",
545545
report_in_external_macro: true
546546
}
547547

compiler/rustc_passes/src/loops.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ impl<'a, 'hir> CheckLoopVisitor<'a, 'hir> {
231231
AsyncClosure(closure_span) => {
232232
self.sess.emit_err(BreakInsideAsyncBlock { span, closure_span, name });
233233
}
234-
UnlabeledBlock(block_span) if is_break && block_span.ctxt() == break_span.ctxt() => {
234+
UnlabeledBlock(block_span) if is_break && block_span.eq_ctxt(break_span) => {
235235
let suggestion = Some(OutsideLoopSuggestion { block_span, break_span });
236236
self.sess.emit_err(OutsideLoop { span, name, is_break, suggestion });
237237
}

0 commit comments

Comments
 (0)