diff options
author | Aleksey Kladov <[email protected]> | 2020-07-11 20:53:32 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-07-11 20:53:32 +0100 |
commit | 66e2266d04610ba69ad8d53d5568bc93d5c92e41 (patch) | |
tree | 4734c7fc5bf40f94576959b895a167f1a37e4658 /crates/ra_hir_def/src/item_tree | |
parent | 00c81f8006926b5a326d4dd11f61ea5ae09aadbd (diff) |
Extern fns are implicitly unsafe
closes #4865
Diffstat (limited to 'crates/ra_hir_def/src/item_tree')
-rw-r--r-- | crates/ra_hir_def/src/item_tree/lower.rs | 1 |
1 files changed, 1 insertions, 0 deletions
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 { | |||
546 | let id: ModItem = match item { | 546 | let id: ModItem = match item { |
547 | ast::ExternItem::FnDef(ast) => { | 547 | ast::ExternItem::FnDef(ast) => { |
548 | let func = self.lower_function(&ast)?; | 548 | let func = self.lower_function(&ast)?; |
549 | self.data().functions[func.index].is_unsafe = true; | ||
549 | func.into() | 550 | func.into() |
550 | } | 551 | } |
551 | ast::ExternItem::StaticDef(ast) => { | 552 | ast::ExternItem::StaticDef(ast) => { |