Skip to content

Commit 03e955d

Browse files
committed
use DefKind::Fn instead of DefKind::AsscFn for foreign items
Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
1 parent a722527 commit 03e955d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_typeck/src/variance/constraints.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ pub fn add_constraints_from_crate<'a, 'tcx>(
8181
}
8282

8383
for id in crate_items.foreign_items() {
84-
if let DefKind::AssocFn = tcx.hir().def_kind(id.def_id) {
84+
if let DefKind::Fn = tcx.hir().def_kind(id.def_id) {
8585
constraint_cx.check_node_helper(id.hir_id());
8686
}
8787
}

0 commit comments

Comments
 (0)