diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-09-28 22:12:10 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-28 22:12:10 +0200 |
| commit | 1c2dd143f3acd76f9dc4612e1f947e07bc790963 (patch) | |
| tree | 35a25b896c72ce5844859d13663b4450a4903a8e | |
| parent | 787829d54a8e6e09c81e3c3b734a86ff69768ae7 (diff) | |
| parent | c666bd5570e62666b40d0a4c3eca7080667a92ef (diff) | |
| download | rust-1c2dd143f3acd76f9dc4612e1f947e07bc790963.tar.gz rust-1c2dd143f3acd76f9dc4612e1f947e07bc790963.zip | |
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.
| -rw-r--r-- | src/librustc_typeck/check/intrinsic.rs | 4 | ||||
| -rw-r--r-- | src/librustc_typeck/collect.rs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc_typeck/check/intrinsic.rs b/src/librustc_typeck/check/intrinsic.rs index d06d51dc819..aeb2c40e2ef 100644 --- a/src/librustc_typeck/check/intrinsic.rs +++ b/src/librustc_typeck/check/intrinsic.rs @@ -63,7 +63,7 @@ fn equate_intrinsic_type<'tcx>( } /// Returns `true` if the given intrinsic is unsafe to call or not. -pub fn intrisic_operation_unsafety(intrinsic: &str) -> hir::Unsafety { +pub fn intrinsic_operation_unsafety(intrinsic: &str) -> hir::Unsafety { match intrinsic { "size_of" | "min_align_of" | "needs_drop" | "add_with_overflow" | "sub_with_overflow" | "mul_with_overflow" | @@ -130,7 +130,7 @@ pub fn check_intrinsic_type(tcx: TyCtxt<'_>, it: &hir::ForeignItem) { } else if &name[..] == "abort" || &name[..] == "unreachable" { (0, Vec::new(), tcx.types.never, hir::Unsafety::Unsafe) } else { - let unsafety = intrisic_operation_unsafety(&name[..]); + let unsafety = intrinsic_operation_unsafety(&name[..]); let (n_tps, inputs, output) = match &name[..] { "breakpoint" => (0, Vec::new(), tcx.mk_unit()), "size_of" | diff --git a/src/librustc_typeck/collect.rs b/src/librustc_typeck/collect.rs index db017394cd5..8c3d6357f0b 100644 --- a/src/librustc_typeck/collect.rs +++ b/src/librustc_typeck/collect.rs @@ -16,7 +16,7 @@ use crate::astconv::{AstConv, Bounds, SizedByDefault}; use crate::constrained_generic_params as cgp; -use crate::check::intrinsic::intrisic_operation_unsafety; +use crate::check::intrinsic::intrinsic_operation_unsafety; use crate::lint; use crate::middle::resolve_lifetime as rl; use crate::middle::weak_lang_items; @@ -2366,7 +2366,7 @@ fn compute_sig_of_foreign_fn_decl<'tcx>( abi: abi::Abi, ) -> ty::PolyFnSig<'tcx> { let unsafety = if abi == abi::Abi::RustIntrinsic { - intrisic_operation_unsafety(&*tcx.item_name(def_id).as_str()) + intrinsic_operation_unsafety(&*tcx.item_name(def_id).as_str()) } else { hir::Unsafety::Unsafe }; |
