Skip to content

Commit 7cece8e

Browse files
committed
Add trait Fns to rust-call resolution
1 parent 1f95c91 commit 7cece8e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler/rustc_typeck/src/check/check.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ pub(super) fn check_fn<'a, 'tcx>(
103103
Node::ImplItem(hir::ImplItem {
104104
kind: hir::ImplItemKind::Fn(header, ..), ..
105105
}) => Some(header),
106+
Node::TraitItem(hir::TraitItem {
107+
kind: hir::TraitItemKind::Fn(header, .. ), ..
108+
}) => Some(header),
106109
// Closures are RustCall, but they tuple their arguments, so shouldn't be checked
107110
Node::Expr(hir::Expr { kind: hir::ExprKind::Closure(..), .. }) => None,
108111
node => bug!("Item being checked wasn't a function/closure: {:?}", node),

0 commit comments

Comments
 (0)