Skip to content

Commit 1c2dd14

Browse files
authored
Rollup merge of #64876 - vertexclique:vcq/fix-fn-name-intrinsic-op-unsafety, r=varkor
Fix typo in intrinsics op safety Title pretty much sums up.
2 parents 787829d + c666bd5 commit 1c2dd14

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/librustc_typeck/check/intrinsic.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ fn equate_intrinsic_type<'tcx>(
6363
}
6464

6565
/// Returns `true` if the given intrinsic is unsafe to call or not.
66-
pub fn intrisic_operation_unsafety(intrinsic: &str) -> hir::Unsafety {
66+
pub fn intrinsic_operation_unsafety(intrinsic: &str) -> hir::Unsafety {
6767
match intrinsic {
6868
"size_of" | "min_align_of" | "needs_drop" |
6969
"add_with_overflow" | "sub_with_overflow" | "mul_with_overflow" |
@@ -130,7 +130,7 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem) {
130130
} else if &name[..] == "abort" || &name[..] == "unreachable" {
131131
(0, Vec::new(), tcx.types.never, hir::Unsafety::Unsafe)
132132
} else {
133-
let unsafety = intrisic_operation_unsafety(&name[..]);
133+
let unsafety = intrinsic_operation_unsafety(&name[..]);
134134
let (n_tps, inputs, output) = match &name[..] {
135135
"breakpoint" => (0, Vec::new(), tcx.mk_unit()),
136136
"size_of" |

src/librustc_typeck/collect.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
1717
use crate::astconv::{AstConv, Bounds, SizedByDefault};
1818
use crate::constrained_generic_params as cgp;
19-
use crate::check::intrinsic::intrisic_operation_unsafety;
19+
use crate::check::intrinsic::intrinsic_operation_unsafety;
2020
use crate::lint;
2121
use crate::middle::resolve_lifetime as rl;
2222
use crate::middle::weak_lang_items;
@@ -2366,7 +2366,7 @@ fn compute_sig_of_foreign_fn_decl<'tcx>(
23662366
abi: abi::Abi,
23672367
) -> ty::PolyFnSig<'tcx> {
23682368
let unsafety = if abi == abi::Abi::RustIntrinsic {
2369-
intrisic_operation_unsafety(&*tcx.item_name(def_id).as_str())
2369+
intrinsic_operation_unsafety(&*tcx.item_name(def_id).as_str())
23702370
} else {
23712371
hir::Unsafety::Unsafe
23722372
};

0 commit comments

Comments
 (0)