about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src/coverage
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage')
-rw-r--r--compiler/rustc_mir_transform/src/coverage/query.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_mir_transform/src/coverage/query.rs b/compiler/rustc_mir_transform/src/coverage/query.rs
index 986c001de5e..551f720c869 100644
--- a/compiler/rustc_mir_transform/src/coverage/query.rs
+++ b/compiler/rustc_mir_transform/src/coverage/query.rs
@@ -35,7 +35,7 @@ fn is_eligible_for_coverage(tcx: TyCtxt<'_>, def_id: LocalDefId) -> bool {
     // Don't instrument functions with `#[automatically_derived]` on their
     // enclosing impl block, on the assumption that most users won't care about
     // coverage for derived impls.
-    if let Some(impl_of) = tcx.impl_of_method(def_id.to_def_id())
+    if let Some(impl_of) = tcx.impl_of_assoc(def_id.to_def_id())
         && tcx.is_automatically_derived(impl_of)
     {
         trace!("InstrumentCoverage skipped for {def_id:?} (automatically derived)");