We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0c64d32 commit d442bf7Copy full SHA for d442bf7
src/librustc_ast_lowering/item.rs
@@ -81,6 +81,8 @@ impl<'a> Visitor<'a> for ItemLowerer<'a, '_, '_> {
81
FnKind::Fn(FnCtxt::Foreign, _, sig, _, _) => {
82
self.visit_fn_header(&sig.header);
83
visit::walk_fn_decl(self, &sig.decl);
84
+ // Don't visit the foreign function body even if it has one, since lowering the
85
+ // body would have no meaning and will have already been caught as a parse error.
86
}
87
_ => visit::walk_fn(self, fk, sp),
88
0 commit comments