From 03e955d812db04e7d6883e04406ca372e123008c Mon Sep 17 00:00:00 2001 From: Miguel Guarniz Date: Wed, 27 Apr 2022 21:52:51 -0400 Subject: [PATCH] use DefKind::Fn instead of DefKind::AsscFn for foreign items Signed-off-by: Miguel Guarniz --- compiler/rustc_typeck/src/variance/constraints.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_typeck/src/variance/constraints.rs b/compiler/rustc_typeck/src/variance/constraints.rs index 47a17b3206b..d9ba6b2581b 100644 --- a/compiler/rustc_typeck/src/variance/constraints.rs +++ b/compiler/rustc_typeck/src/variance/constraints.rs @@ -81,7 +81,7 @@ pub fn add_constraints_from_crate<'a, 'tcx>( } for id in crate_items.foreign_items() { - if let DefKind::AssocFn = tcx.hir().def_kind(id.def_id) { + if let DefKind::Fn = tcx.hir().def_kind(id.def_id) { constraint_cx.check_node_helper(id.hir_id()); } }