Skip to content

Commit 98dfbe0

Browse files
Fix cg_clif and cg_gcc
1 parent 7ac65c1 commit 98dfbe0

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

compiler/rustc_codegen_cranelift/src/abi/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ pub(crate) fn codegen_drop<'tcx>(
673673
fx.layout_of(Ty::new_ref(
674674
fx.tcx,
675675
fx.tcx.lifetimes.re_erased,
676-
TypeAndMut { ty, mutbl: crate::rustc_hir::Mutability::Mut },
676+
TypeAndMut { ty, mutbl: Mutability::Mut },
677677
)),
678678
);
679679
let arg_value = adjust_arg_for_abi(fx, arg_value, &fn_abi.args[0], true);

compiler/rustc_codegen_cranelift/src/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ fn clif_pair_type_from_ty<'tcx>(
9898

9999
/// Is a pointer to this type a fat ptr?
100100
pub(crate) fn has_ptr_meta<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> bool {
101-
let ptr_ty = Ty::new_ptr(tcx, TypeAndMut { ty, mutbl: rustc_hir::Mutability::Not });
101+
let ptr_ty = Ty::new_ptr(tcx, TypeAndMut { ty, mutbl: Mutability::Not });
102102
match &tcx.layout_of(ParamEnv::reveal_all().and(ptr_ty)).unwrap().abi {
103103
Abi::Scalar(_) => false,
104104
Abi::ScalarPair(_, _) => true,

compiler/rustc_codegen_cranelift/src/constant.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ pub(crate) fn data_id_for_alloc_id(
216216
cx: &mut ConstantCx,
217217
module: &mut dyn Module,
218218
alloc_id: AllocId,
219-
mutability: rustc_hir::Mutability,
219+
mutability: ty::Mutability,
220220
) -> DataId {
221221
cx.todo.push(TodoItem::Alloc(alloc_id));
222222
*cx.anon_allocs

compiler/rustc_codegen_gcc/src/intrinsic/simd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
740740
let (_, element_ty1) = arg_tys[1].simd_size_and_type(bx.tcx());
741741
let (_, element_ty2) = arg_tys[2].simd_size_and_type(bx.tcx());
742742
let (pointer_count, underlying_ty) = match element_ty1.kind() {
743-
ty::RawPtr(p) if p.ty == in_elem && p.mutbl == hir::Mutability::Mut => {
743+
ty::RawPtr(p) if p.ty == in_elem && p.mutbl == ty::Mutability::Mut => {
744744
(ptr_count(element_ty1), non_ptr(element_ty1))
745745
}
746746
_ => {

0 commit comments

Comments
 (0)