1
Fork 0

hir: Remove hir::Map::{owner,expect_owner}

This commit is contained in:
Vadim Petrochenkov 2024-01-25 20:47:03 +03:00
parent 667d5d325f
commit db41f4aaa0
10 changed files with 11 additions and 19 deletions

View file

@ -583,7 +583,7 @@ impl UnsafeOpKind {
suggest_unsafe_block: bool,
) {
let parent_id = tcx.hir().get_parent_item(hir_id);
let parent_owner = tcx.hir().owner(parent_id);
let parent_owner = tcx.hir_owner_node(parent_id);
let should_suggest = parent_owner.fn_sig().is_some_and(|sig| sig.header.is_unsafe());
let unsafe_not_inherited_note = if should_suggest {
suggest_unsafe_block.then(|| {