Skip to content

Commit 3433dc9

Browse files
committed
1 parent a0485c5 commit 3433dc9

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#![warn(rust_2018_idioms)]
99
#![allow(clippy::cast_lossless)]
1010

11-
extern crate rustc_attr;
1211
extern crate rustc_apfloat;
1312
extern crate rustc_ast;
1413
#[macro_use] extern crate rustc_middle;

src/shims/intrinsics.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ use std::iter;
22

33
use log::trace;
44

5-
use rustc_attr as attr;
6-
use rustc_ast::ast::FloatTy;
7-
use rustc_middle::{mir, mir::BinOp, ty};
5+
use rustc_middle::{mir, mir::BinOp, ty, ty::FloatTy};
86
use rustc_middle::ty::layout::IntegerExt;
97
use rustc_apfloat::{Float, Round};
108
use rustc_target::abi::{Align, Integer, LayoutOf};
@@ -578,7 +576,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
578576
Ok(match dest_ty.kind() {
579577
// Unsigned
580578
ty::Uint(t) => {
581-
let size = Integer::from_attr(this, attr::IntType::UnsignedInt(*t)).size();
579+
let size = Integer::from_uint_ty(this, *t).size();
582580
let res = f.to_u128(size.bits_usize());
583581
if res.status.is_empty() {
584582
// No status flags means there was no further rounding or other loss of precision.
@@ -593,7 +591,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
593591
}
594592
// Signed
595593
ty::Int(t) => {
596-
let size = Integer::from_attr(this, attr::IntType::SignedInt(*t)).size();
594+
let size = Integer::from_int_ty(this, *t).size();
597595
let res = f.to_i128(size.bits_usize());
598596
if res.status.is_empty() {
599597
// No status flags means there was no further rounding or other loss of precision.

0 commit comments

Comments
 (0)