From 52ad8199d502cdce296a2145cad2650795a2f3f6 Mon Sep 17 00:00:00 2001 From: Arthur Lafrance Date: Mon, 16 Oct 2023 01:17:52 -0700 Subject: [PATCH] tweak pass description and fix lint fail post-rebase --- compiler/rustc_lint/src/internal.rs | 2 +- compiler/rustc_passes/src/loops.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_lint/src/internal.rs b/compiler/rustc_lint/src/internal.rs index 34f241e8c8d21..2d86129c480c6 100644 --- a/compiler/rustc_lint/src/internal.rs +++ b/compiler/rustc_lint/src/internal.rs @@ -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 } diff --git a/compiler/rustc_passes/src/loops.rs b/compiler/rustc_passes/src/loops.rs index 4590ab9e4f579..25e131d7477fd 100644 --- a/compiler/rustc_passes/src/loops.rs +++ b/compiler/rustc_passes/src/loops.rs @@ -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 }); }