Use Span::eq_ctxt method instead of .ctxt() == .ctxt()

This commit is contained in:
Michael Goulet 2022-06-19 16:27:29 -07:00
parent 2c3bb42ebd
commit 52c9906c4b
7 changed files with 12 additions and 9 deletions

View file

@ -121,7 +121,7 @@ impl<'a, 'tcx> Instrumentor<'a, 'tcx> {
let source_file = source_map.lookup_source_file(body_span.lo());
let fn_sig_span = match some_fn_sig.filter(|fn_sig| {
fn_sig.span.ctxt() == body_span.ctxt()
fn_sig.span.eq_ctxt(body_span)
&& Lrc::ptr_eq(&source_file, &source_map.lookup_source_file(fn_sig.span.lo()))
}) {
Some(fn_sig) => fn_sig.span.with_hi(body_span.lo()),