1
Fork 0

Make the signature of equate_intrinsic_type support items other than ForeignItem

This commit is contained in:
Oli Scherer 2024-01-31 14:05:14 +00:00
parent 92281c7e81
commit 79daf6107c
2 changed files with 22 additions and 18 deletions

View file

@ -1480,7 +1480,7 @@ fn compute_sig_of_foreign_fn_decl<'tcx>(
abi: abi::Abi,
) -> ty::PolyFnSig<'tcx> {
let unsafety = if abi == abi::Abi::RustIntrinsic {
intrinsic_operation_unsafety(tcx, def_id.to_def_id())
intrinsic_operation_unsafety(tcx, def_id)
} else {
hir::Unsafety::Unsafe
};