Add trait Fns to rust-call resolution
This commit is contained in:
parent
1f95c91c88
commit
7cece8eca3
1 changed files with 3 additions and 0 deletions
|
@ -103,6 +103,9 @@ pub(super) fn check_fn<'a, 'tcx>(
|
|||
Node::ImplItem(hir::ImplItem {
|
||||
kind: hir::ImplItemKind::Fn(header, ..), ..
|
||||
}) => Some(header),
|
||||
Node::TraitItem(hir::TraitItem {
|
||||
kind: hir::TraitItemKind::Fn(header, .. ), ..
|
||||
}) => Some(header),
|
||||
// Closures are RustCall, but they tuple their arguments, so shouldn't be checked
|
||||
Node::Expr(hir::Expr { kind: hir::ExprKind::Closure(..), .. }) => None,
|
||||
node => bug!("Item being checked wasn't a function/closure: {:?}", node),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue