Skip to content

Commit 104802b

Browse files
Fix cg_clif and cg_gcc
1 parent 973f184 commit 104802b

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
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: ty::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: ty::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: 2 additions & 2 deletions
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
@@ -397,7 +397,7 @@ fn define_all_allocs(tcx: TyCtxt<'_>, module: &mut dyn Module, cx: &mut Constant
397397
}
398398
GlobalAlloc::VTable(ty, trait_ref) => {
399399
let alloc_id = tcx.vtable_allocation((ty, trait_ref));
400-
data_id_for_alloc_id(cx, module, alloc_id, Mutability::Not)
400+
data_id_for_alloc_id(cx, module, alloc_id, ty::Mutability::Not)
401401
}
402402
GlobalAlloc::Static(def_id) => {
403403
if tcx.codegen_fn_attrs(def_id).flags.contains(CodegenFnAttrFlags::THREAD_LOCAL)

compiler/rustc_codegen_cranelift/src/vtable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ pub(crate) fn get_vtable<'tcx>(
9494
) -> Value {
9595
let alloc_id = fx.tcx.vtable_allocation((ty, trait_ref));
9696
let data_id =
97-
data_id_for_alloc_id(&mut fx.constants_cx, &mut *fx.module, alloc_id, Mutability::Not);
97+
data_id_for_alloc_id(&mut fx.constants_cx, &mut *fx.module, alloc_id, ty::Mutability::Not);
9898
let local_data_id = fx.module.declare_data_in_func(data_id, &mut fx.bcx.func);
9999
if fx.clif_comments.enabled() {
100100
fx.add_comment(local_data_id, format!("vtable: {:?}", alloc_id));

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)