Auto merge of #120346 - petrochenkov:ownodes, r=oli-obk
hir: Refactor getters for owner nodes
This commit is contained in:
commit
d53ddcd8bb
49 changed files with 918 additions and 925 deletions
|
@ -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(|| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue