mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-01 05:57:03 +03:00
Change ty.kind -> ty.kind()
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
d9cd4a33f53689bc0847775669a14f666a138fd7
|
||||
d2454643e137bde519786ee9e650c455d7ad6f34
|
||||
|
||||
+1
-1
@@ -280,7 +280,7 @@ fn ecx(&self) -> &MiriEvalContext<'mir, 'tcx> {
|
||||
// Hook to detect `UnsafeCell`.
|
||||
fn visit_value(&mut self, v: MPlaceTy<'tcx, Tag>) -> InterpResult<'tcx> {
|
||||
trace!("UnsafeCellVisitor: {:?} {:?}", *v, v.layout.ty);
|
||||
let is_unsafe_cell = match v.layout.ty.kind {
|
||||
let is_unsafe_cell = match v.layout.ty.kind() {
|
||||
ty::Adt(adt, _) =>
|
||||
Some(adt.did) == self.ecx.tcx.lang_items().unsafe_cell_type(),
|
||||
_ => false,
|
||||
|
||||
@@ -299,7 +299,7 @@ fn call_intrinsic(
|
||||
let &[val] = check_arg_count(args)?;
|
||||
let val = this.read_immediate(val)?;
|
||||
|
||||
let res = match val.layout.ty.kind {
|
||||
let res = match val.layout.ty.kind() {
|
||||
ty::Float(FloatTy::F32) => {
|
||||
this.float_to_int_unchecked(val.to_scalar()?.to_f32()?, dest.layout.ty)?
|
||||
}
|
||||
@@ -528,10 +528,10 @@ fn float_to_int_unchecked<F>(
|
||||
let f = f.round_to_integral(Round::TowardZero).value;
|
||||
|
||||
// Step 2: Cast the truncated float to the target integer type and see if we lose any information in this step.
|
||||
Ok(match dest_ty.kind {
|
||||
Ok(match dest_ty.kind() {
|
||||
// Unsigned
|
||||
ty::Uint(t) => {
|
||||
let size = Integer::from_attr(this, attr::IntType::UnsignedInt(t)).size();
|
||||
let size = Integer::from_attr(this, attr::IntType::UnsignedInt(*t)).size();
|
||||
let res = f.to_u128(size.bits_usize());
|
||||
if res.status.is_empty() {
|
||||
// No status flags means there was no further rounding or other loss of precision.
|
||||
@@ -546,7 +546,7 @@ fn float_to_int_unchecked<F>(
|
||||
}
|
||||
// Signed
|
||||
ty::Int(t) => {
|
||||
let size = Integer::from_attr(this, attr::IntType::SignedInt(t)).size();
|
||||
let size = Integer::from_attr(this, attr::IntType::SignedInt(*t)).size();
|
||||
let res = f.to_i128(size.bits_usize());
|
||||
if res.status.is_empty() {
|
||||
// No status flags means there was no further rounding or other loss of precision.
|
||||
|
||||
@@ -623,7 +623,7 @@ fn retag(&mut self, kind: RetagKind, place: PlaceTy<'tcx, Tag>) -> InterpResult<
|
||||
// Cannot use `builtin_deref` because that reports *immutable* for `Box`,
|
||||
// making it useless.
|
||||
fn qualify(ty: ty::Ty<'_>, kind: RetagKind) -> Option<(RefKind, bool)> {
|
||||
match ty.kind {
|
||||
match ty.kind() {
|
||||
// References are simple.
|
||||
ty::Ref(_, _, Mutability::Mut) => Some((
|
||||
RefKind::Unique { two_phase: kind == RetagKind::TwoPhase },
|
||||
|
||||
Reference in New Issue
Block a user