Skip to content

Commit 5f1182d

Browse files
committed
Auto merge of #1534 - LeSeulArtichaut:tys-kind, r=RalfJung
Change `ty.kind` -> `ty.kind()` This fixes build failure due to rust-lang/rust#75077, cc rust-lang/rust#76337. (This is my first PR here, please tell me if anything's wrong)
2 parents c28a8ee + 4f2f87b commit 5f1182d

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

rust-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
d9cd4a33f53689bc0847775669a14f666a138fd7
1+
d2454643e137bde519786ee9e650c455d7ad6f34

src/helpers.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
280280
// Hook to detect `UnsafeCell`.
281281
fn visit_value(&mut self, v: MPlaceTy<'tcx, Tag>) -> InterpResult<'tcx> {
282282
trace!("UnsafeCellVisitor: {:?} {:?}", *v, v.layout.ty);
283-
let is_unsafe_cell = match v.layout.ty.kind {
283+
let is_unsafe_cell = match v.layout.ty.kind() {
284284
ty::Adt(adt, _) =>
285285
Some(adt.did) == self.ecx.tcx.lang_items().unsafe_cell_type(),
286286
_ => false,

src/shims/intrinsics.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
299299
let &[val] = check_arg_count(args)?;
300300
let val = this.read_immediate(val)?;
301301

302-
let res = match val.layout.ty.kind {
302+
let res = match val.layout.ty.kind() {
303303
ty::Float(FloatTy::F32) => {
304304
this.float_to_int_unchecked(val.to_scalar()?.to_f32()?, dest.layout.ty)?
305305
}
@@ -528,10 +528,10 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
528528
let f = f.round_to_integral(Round::TowardZero).value;
529529

530530
// Step 2: Cast the truncated float to the target integer type and see if we lose any information in this step.
531-
Ok(match dest_ty.kind {
531+
Ok(match dest_ty.kind() {
532532
// Unsigned
533533
ty::Uint(t) => {
534-
let size = Integer::from_attr(this, attr::IntType::UnsignedInt(t)).size();
534+
let size = Integer::from_attr(this, attr::IntType::UnsignedInt(*t)).size();
535535
let res = f.to_u128(size.bits_usize());
536536
if res.status.is_empty() {
537537
// No status flags means there was no further rounding or other loss of precision.
@@ -546,7 +546,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
546546
}
547547
// Signed
548548
ty::Int(t) => {
549-
let size = Integer::from_attr(this, attr::IntType::SignedInt(t)).size();
549+
let size = Integer::from_attr(this, attr::IntType::SignedInt(*t)).size();
550550
let res = f.to_i128(size.bits_usize());
551551
if res.status.is_empty() {
552552
// No status flags means there was no further rounding or other loss of precision.

src/stacked_borrows.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
623623
// Cannot use `builtin_deref` because that reports *immutable* for `Box`,
624624
// making it useless.
625625
fn qualify(ty: ty::Ty<'_>, kind: RetagKind) -> Option<(RefKind, bool)> {
626-
match ty.kind {
626+
match ty.kind() {
627627
// References are simple.
628628
ty::Ref(_, _, Mutability::Mut) => Some((
629629
RefKind::Unique { two_phase: kind == RetagKind::TwoPhase },

0 commit comments

Comments
 (0)