fix: classify safe as a contextual kw

This commit is contained in:
roife 2024-10-21 02:56:21 +08:00
parent 002f6ad6f1
commit 834ccbffba
5 changed files with 11 additions and 11 deletions

View file

@ -273,7 +273,7 @@ pub fn is_fn_unsafe_to_call(db: &dyn HirDatabase, func: FunctionId) -> bool {
!data.attrs.by_key(&sym::rustc_safe_intrinsic).exists()
} else {
// Extern items without `safe` modifier are always unsafe
!db.function_data(func).is_safe()
!data.is_safe()
}
}
_ => false,