Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir/src/display.rs')
| -rw-r--r-- | crates/hir/src/display.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/hir/src/display.rs b/crates/hir/src/display.rs index b29c91694d..6f4168ab08 100644 --- a/crates/hir/src/display.rs +++ b/crates/hir/src/display.rs @@ -80,7 +80,9 @@ impl HirDisplay for Function { if data.is_async() { f.write_str("async ")?; } - if self.is_unsafe_to_call(db) { + // FIXME: This will show `unsafe` for functions that are `#[target_feature]` but not unsafe + // (they are conditionally unsafe to call). We probably should show something else. + if self.is_unsafe_to_call(db, None, f.edition()) { f.write_str("unsafe ")?; } if let Some(abi) = &data.abi { |