Skip to content

Commit

Permalink
Ignore the into in cargo/crates/crates-io/lib.rs and cargo
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Jan 10, 2025
1 parent d420b82 commit 293695f
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion compiler/rustc_lint/src/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3146,12 +3146,29 @@ impl<'tcx> LateLintPass<'tcx> for SelfTypeConversion<'tcx> {
tracing::info!("not into_fn {:?}", cx.tcx.get_diagnostic_item(sym::into_fn));
return;
}
tracing::info!(?def_id);
tracing::info!(?expr);
if expr.span.macro_backtrace().next().is_some() {
return;
}
if cx.tcx.sess.source_map().span_to_embeddable_string(expr.span).contains("symbolize/gimli")
|| cx
.tcx
.sess
.source_map()
.span_to_embeddable_string(expr.span)
.contains("crates/crates-io")
|| cx
.tcx
.sess
.source_map()
.span_to_embeddable_string(expr.span)
.contains("core/shell")
|| cx
.tcx
.sess
.source_map()
.span_to_embeddable_string(expr.span)
.contains("git/known_hosts")
{
// HACK
return;
Expand Down

0 comments on commit 293695f

Please sign in to comment.