From 66e2266d04610ba69ad8d53d5568bc93d5c92e41 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 11 Jul 2020 21:53:32 +0200 Subject: Extern fns are implicitly unsafe closes #4865 --- crates/ra_hir_def/src/item_tree/lower.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'crates/ra_hir_def/src/item_tree') diff --git a/crates/ra_hir_def/src/item_tree/lower.rs b/crates/ra_hir_def/src/item_tree/lower.rs index eaa10d999..0b1509e13 100644 --- a/crates/ra_hir_def/src/item_tree/lower.rs +++ b/crates/ra_hir_def/src/item_tree/lower.rs @@ -546,6 +546,7 @@ impl Ctx { let id: ModItem = match item { ast::ExternItem::FnDef(ast) => { let func = self.lower_function(&ast)?; + self.data().functions[func.index].is_unsafe = true; func.into() } ast::ExternItem::StaticDef(ast) => { -- cgit v1.2.3