diff options
| author | LeSeulArtichaut <leseulartichaut@gmail.com> | 2020-12-12 15:32:30 +0100 |
|---|---|---|
| committer | LeSeulArtichaut <leseulartichaut@gmail.com> | 2021-01-18 21:09:30 +0100 |
| commit | 50e1ae15e9f3035b06bae00e1b1dc7a358546d3e (patch) | |
| tree | e5cee77dc418dba544f105f5732636aa63f558f4 /compiler/rustc_mir_build/src/build | |
| parent | 933bb18956f8e8a57e130ce0c9d342becc0ad0ae (diff) | |
| download | rust-50e1ae15e9f3035b06bae00e1b1dc7a358546d3e.tar.gz rust-50e1ae15e9f3035b06bae00e1b1dc7a358546d3e.zip | |
Use ty::{IntTy,UintTy,FloatTy} in rustc
Diffstat (limited to 'compiler/rustc_mir_build/src/build')
| -rw-r--r-- | compiler/rustc_mir_build/src/build/matches/simplify.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_mir_build/src/build/matches/simplify.rs b/compiler/rustc_mir_build/src/build/matches/simplify.rs index 705266d4a0b..02cc4de5290 100644 --- a/compiler/rustc_mir_build/src/build/matches/simplify.rs +++ b/compiler/rustc_mir_build/src/build/matches/simplify.rs @@ -15,7 +15,6 @@ use crate::build::matches::{Ascription, Binding, Candidate, MatchPair}; use crate::build::Builder; use crate::thir::{self, *}; -use rustc_attr::{SignedInt, UnsignedInt}; use rustc_hir::RangeEnd; use rustc_middle::mir::Place; use rustc_middle::ty; @@ -203,13 +202,13 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { (Some(('\u{0000}' as u128, '\u{10FFFF}' as u128, Size::from_bits(32))), 0) } ty::Int(ity) => { - let size = Integer::from_attr(&tcx, SignedInt(ity)).size(); + let size = Integer::from_int_ty(&tcx, ity).size(); let max = size.truncate(u128::MAX); let bias = 1u128 << (size.bits() - 1); (Some((0, max, size)), bias) } ty::Uint(uty) => { - let size = Integer::from_attr(&tcx, UnsignedInt(uty)).size(); + let size = Integer::from_uint_ty(&tcx, uty).size(); let max = size.truncate(u128::MAX); (Some((0, max, size)), 0) } |
