diff options
| author | bors <bors@rust-lang.org> | 2017-02-03 22:55:28 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-02-03 22:55:28 +0000 |
| commit | 0648517faf1e2cf37c8b6770cbd0180a816ed9a0 (patch) | |
| tree | 72112e627a4cd04f53203220fbfc101c9e12b7b6 | |
| parent | 86d9ed6c82c6745fec46b9ecf2fa91be7924dd16 (diff) | |
| parent | 626e754473da96a670c917b9cbefd1c1ea888a9c (diff) | |
| download | rust-0648517faf1e2cf37c8b6770cbd0180a816ed9a0.tar.gz rust-0648517faf1e2cf37c8b6770cbd0180a816ed9a0.zip | |
Auto merge of #39463 - alexcrichton:update-bootstrap, r=alexcrichton
Bump version, upgrade bootstrap This commit updates the version number to 1.17.0 as we're not on that version of the nightly compiler, and at the same time this updates src/stage0.txt to bootstrap from freshly minted beta compiler and beta Cargo.
65 files changed, 111 insertions, 494 deletions
diff --git a/mk/crates.mk b/mk/crates.mk index f801605d9fa..320ba44ed80 100644 --- a/mk/crates.mk +++ b/mk/crates.mk @@ -54,7 +54,7 @@ TARGET_CRATES := libc std term \ compiler_builtins core alloc \ std_unicode rustc_bitflags \ alloc_system alloc_jemalloc \ - panic_abort panic_unwind unwind rustc_i128 + panic_abort panic_unwind unwind RUSTC_CRATES := rustc rustc_typeck rustc_mir rustc_borrowck rustc_resolve rustc_driver \ rustc_trans rustc_back rustc_llvm rustc_privacy rustc_lint \ rustc_data_structures rustc_platform_intrinsics rustc_errors \ @@ -92,25 +92,24 @@ DEPS_getopts := std DEPS_graphviz := std DEPS_log := std DEPS_num := std -DEPS_serialize := std log rustc_i128 +DEPS_serialize := std log DEPS_term := std DEPS_test := std getopts term native:rust_test_helpers -DEPS_rustc_i128 = std DEPS_syntax := std term serialize log arena libc rustc_bitflags std_unicode rustc_errors \ - syntax_pos rustc_data_structures rustc_i128 + syntax_pos rustc_data_structures DEPS_syntax_ext := syntax syntax_pos rustc_errors fmt_macros proc_macro DEPS_proc_macro := syntax syntax_pos rustc_plugin log DEPS_syntax_pos := serialize DEPS_proc_macro_plugin := syntax syntax_pos rustc_plugin -DEPS_rustc_const_math := std syntax log serialize rustc_i128 +DEPS_rustc_const_math := std syntax log serialize DEPS_rustc_const_eval := rustc_const_math rustc syntax log serialize \ - rustc_back graphviz syntax_pos rustc_i128 + rustc_back graphviz syntax_pos DEPS_rustc := syntax fmt_macros flate arena serialize getopts \ log graphviz rustc_llvm rustc_back rustc_data_structures\ - rustc_const_math syntax_pos rustc_errors rustc_i128 + rustc_const_math syntax_pos rustc_errors DEPS_rustc_back := std syntax flate log libc DEPS_rustc_borrowck := rustc log graphviz syntax syntax_pos rustc_errors rustc_mir DEPS_rustc_data_structures := std log serialize libc @@ -121,20 +120,19 @@ DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_bo rustc_passes rustc_save_analysis rustc_const_eval \ rustc_incremental syntax_pos rustc_errors proc_macro rustc_data_structures DEPS_rustc_errors := log libc serialize syntax_pos -DEPS_rustc_lint := rustc log syntax syntax_pos rustc_const_eval rustc_i128 +DEPS_rustc_lint := rustc log syntax syntax_pos rustc_const_eval DEPS_rustc_llvm := native:rustllvm libc std rustc_bitflags DEPS_proc_macro := std syntax DEPS_rustc_metadata := rustc syntax syntax_pos rustc_errors rustc_const_math \ - proc_macro syntax_ext rustc_i128 + proc_macro syntax_ext DEPS_rustc_passes := syntax syntax_pos rustc core rustc_const_eval rustc_errors -DEPS_rustc_mir := rustc syntax syntax_pos rustc_const_math rustc_const_eval rustc_bitflags \ - rustc_i128 +DEPS_rustc_mir := rustc syntax syntax_pos rustc_const_math rustc_const_eval rustc_bitflags DEPS_rustc_resolve := arena rustc log syntax syntax_pos rustc_errors DEPS_rustc_platform_intrinsics := std DEPS_rustc_plugin := rustc rustc_metadata syntax syntax_pos rustc_errors DEPS_rustc_privacy := rustc log syntax syntax_pos DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back \ - log syntax serialize rustc_llvm rustc_platform_intrinsics rustc_i128 \ + log syntax serialize rustc_llvm rustc_platform_intrinsics \ rustc_const_math rustc_const_eval rustc_incremental rustc_errors syntax_pos DEPS_rustc_incremental := rustc syntax_pos serialize rustc_data_structures DEPS_rustc_save_analysis := rustc log syntax syntax_pos serialize @@ -162,7 +160,6 @@ ONLY_RLIB_alloc := 1 ONLY_RLIB_rand := 1 ONLY_RLIB_collections := 1 ONLY_RLIB_std_unicode := 1 -ONLY_RLIB_rustc_i128 := 1 ONLY_RLIB_rustc_bitflags := 1 ONLY_RLIB_alloc_system := 1 ONLY_RLIB_alloc_jemalloc := 1 diff --git a/mk/main.mk b/mk/main.mk index 9cd30be6531..6b409eebc74 100644 --- a/mk/main.mk +++ b/mk/main.mk @@ -13,7 +13,7 @@ ###################################################################### # The version number -CFG_RELEASE_NUM=1.16.0 +CFG_RELEASE_NUM=1.17.0 # An optional number to put after the label, e.g. '.2' -> '-beta.2' # NB Make sure it starts with a dot to conform to semver pre-release diff --git a/src/Cargo.lock b/src/Cargo.lock index c058586410d..95b963f6a78 100644 --- a/src/Cargo.lock +++ b/src/Cargo.lock @@ -248,7 +248,6 @@ dependencies = [ "rustc_const_math 0.0.0", "rustc_data_structures 0.0.0", "rustc_errors 0.0.0", - "rustc_i128 0.0.0", "rustc_llvm 0.0.0", "serialize 0.0.0", "syntax 0.0.0", @@ -308,7 +307,6 @@ dependencies = [ "rustc_const_math 0.0.0", "rustc_data_structures 0.0.0", "rustc_errors 0.0.0", - "rustc_i128 0.0.0", "syntax 0.0.0", "syntax_pos 0.0.0", ] @@ -317,7 +315,6 @@ dependencies = [ name = "rustc_const_math" version = "0.0.0" dependencies = [ - "rustc_i128 0.0.0", "serialize 0.0.0", "syntax 0.0.0", ] @@ -327,7 +324,6 @@ name = "rustc_data_structures" version = "0.0.0" dependencies = [ "log 0.0.0", - "rustc_i128 0.0.0", "serialize 0.0.0", ] @@ -371,10 +367,6 @@ dependencies = [ ] [[package]] -name = "rustc_i128" -version = "0.0.0" - -[[package]] name = "rustc_incremental" version = "0.0.0" dependencies = [ @@ -395,7 +387,6 @@ dependencies = [ "rustc 0.0.0", "rustc_back 0.0.0", "rustc_const_eval 0.0.0", - "rustc_i128 0.0.0", "syntax 0.0.0", "syntax_pos 0.0.0", ] @@ -421,7 +412,6 @@ dependencies = [ "rustc_const_math 0.0.0", "rustc_data_structures 0.0.0", "rustc_errors 0.0.0", - "rustc_i128 0.0.0", "rustc_llvm 0.0.0", "serialize 0.0.0", "syntax 0.0.0", @@ -440,7 +430,6 @@ dependencies = [ "rustc_const_eval 0.0.0", "rustc_const_math 0.0.0", "rustc_data_structures 0.0.0", - "rustc_i128 0.0.0", "syntax 0.0.0", "syntax_pos 0.0.0", ] @@ -519,7 +508,6 @@ dependencies = [ "rustc_const_math 0.0.0", "rustc_data_structures 0.0.0", "rustc_errors 0.0.0", - "rustc_i128 0.0.0", "rustc_incremental 0.0.0", "rustc_llvm 0.0.0", "rustc_platform_intrinsics 0.0.0", @@ -571,9 +559,6 @@ dependencies = [ [[package]] name = "serialize" version = "0.0.0" -dependencies = [ - "rustc_i128 0.0.0", -] [[package]] name = "std" @@ -618,7 +603,6 @@ dependencies = [ "rustc_bitflags 0.0.0", "rustc_data_structures 0.0.0", "rustc_errors 0.0.0", - "rustc_i128 0.0.0", "serialize 0.0.0", "syntax_pos 0.0.0", ] diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index b6f490e09cd..82d361fb0e8 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -293,7 +293,6 @@ impl<T: ?Sized> Box<T> { } } -#[cfg(not(stage0))] #[stable(feature = "rust1", since = "1.0.0")] unsafe impl<#[may_dangle] T: ?Sized> Drop for Box<T> { fn drop(&mut self) { diff --git a/src/liballoc/heap.rs b/src/liballoc/heap.rs index 81ed4be7763..51e6f2f8bd7 100644 --- a/src/liballoc/heap.rs +++ b/src/liballoc/heap.rs @@ -144,14 +144,6 @@ unsafe fn exchange_malloc(size: usize, align: usize) -> *mut u8 { } #[cfg(not(test))] -#[cfg(stage0)] -#[lang = "exchange_free"] -#[inline] -unsafe fn exchange_free(ptr: *mut u8, old_size: usize, align: usize) { - deallocate(ptr, old_size, align); -} - -#[cfg(not(test))] #[lang = "box_free"] #[inline] unsafe fn box_free<T: ?Sized>(ptr: *mut T) { diff --git a/src/libcompiler_builtins/lib.rs b/src/libcompiler_builtins/lib.rs index 662d7422f5f..b2a615456aa 100644 --- a/src/libcompiler_builtins/lib.rs +++ b/src/libcompiler_builtins/lib.rs @@ -20,7 +20,6 @@ #![feature(staged_api, core_intrinsics, repr_simd, i128_type, core_float, abi_unadjusted, associated_consts)] #![allow(non_camel_case_types, unused_variables, unused_imports)] -#![cfg_attr(stage0, allow(dead_code))] #[cfg(any(target_pointer_width="32", target_pointer_width="16", target_os="windows", target_arch="mips64"))] @@ -32,17 +31,6 @@ pub mod reimpls { use core::intrinsics::unchecked_rem; use core::ptr; - // C API is expected to tolerate some amount of size mismatch in ABI. Hopefully the amount of - // handling is sufficient for bootstrapping. - #[cfg(stage0)] - type u128_ = u64; - #[cfg(stage0)] - type i128_ = i64; - #[cfg(not(stage0))] - type u128_ = u128; - #[cfg(not(stage0))] - type i128_ = i128; - macro_rules! ashl { ($a:expr, $b:expr, $ty:ty) => {{ let (a, b) = ($a, $b); @@ -63,8 +51,8 @@ pub mod reimpls { } #[export_name="__ashlti3"] - pub extern "C" fn shl(a: u128_, b: u128_) -> u128_ { - ashl!(a, b, u128_) + pub extern "C" fn shl(a: u128, b: u128) -> u128 { + ashl!(a, b, u128) } macro_rules! ashr { @@ -88,8 +76,8 @@ pub mod reimpls { } #[export_name="__ashrti3"] - pub extern "C" fn shr(a: i128_, b: i128_) -> i128_ { - ashr!(a, b, i128_) + pub extern "C" fn shr(a: i128, b: i128) -> i128 { + ashr!(a, b, i128) } macro_rules! lshr { @@ -111,22 +99,11 @@ pub mod reimpls { #[export_name="__lshrti3"] - pub extern "C" fn lshr(a: u128_, b: u128_) -> u128_ { - lshr!(a, b, u128_) - } - - #[cfg(stage0)] - pub extern "C" fn u128_div_mod(n: u128_, d: u128_, rem: *mut u128_) -> u128_ { - unsafe { - if !rem.is_null() { - *rem = unchecked_rem(n, d); - } - unchecked_div(n, d) - } + pub extern "C" fn lshr(a: u128, b: u128) -> u128 { + lshr!(a, b, u128) } - #[cfg(not(stage0))] - pub extern "C" fn u128_div_mod(n: u128_, d: u128_, rem: *mut u128_) -> u128_ { + pub extern "C" fn u128_div_mod(n: u128, d: u128, rem: *mut u128) -> u128 { // Translated from Figure 3-40 of The PowerPC Compiler Writer's Guide unsafe { // special cases, X is unknown, K != 0 @@ -291,36 +268,30 @@ pub mod reimpls { } } - fn i128_mod(a: i128_, b: i128_) -> i128_ { + fn i128_mod(a: i128, b: i128) -> i128 { let b = b.uabs(); let sa = a.signum(); let a = a.uabs(); unsafe { let mut r = ::core::mem::zeroed(); u128_div_mod(a, b, &mut r); - if sa == -1 { (r as i128_).unchecked_neg() } else { r as i128_ } + if sa == -1 { (r as i128).unchecked_neg() } else { r as i128 } } } - fn i128_div(a: i128_, b: i128_) -> i128_ { + fn i128_div(a: i128, b: i128) -> i128 { let sa = a.signum(); let sb = b.signum(); let a = a.uabs(); let b = b.uabs(); let sr = sa.wrapping_mul(sb); // sign of quotient (if sr == -1 { - (u128_div_mod(a, b, ptr::null_mut()) as i128_).unchecked_neg() + (u128_div_mod(a, b, ptr::null_mut()) as i128).unchecked_neg() } else { - u128_div_mod(a, b, ptr::null_mut()) as i128_ + u128_div_mod(a, b, ptr::null_mut()) as i128 }) } - #[cfg(stage0)] - #[export_name="__udivti3"] - pub extern "C" fn u128_div(a: u128_, b: u128_) -> u128_ { - (a / b) - } - macro_rules! mulo { ($a:expr, $b:expr, $o: expr, $ty: ty) => {{ let (a, b, overflow) = ($a, $b, $o); @@ -367,35 +338,6 @@ pub mod reimpls { fn high(self) -> Self::HighHalf; fn from_parts(low: Self::LowHalf, high: Self::HighHalf) -> Self; } - impl LargeInt for u64 { - type LowHalf = u32; - type HighHalf = u32; - - fn low(self) -> u32 { - self as u32 - } - fn high(self) -> u32 { - (self.wrapping_shr(32)) as u32 - } - fn from_parts(low: u32, high: u32) -> u64 { - low as u64 | (high as u64).wrapping_shl(32) - } - } - impl LargeInt for i64 { - type LowHalf = u32; - type HighHalf = i32; - - fn low(self) -> u32 { - self as u32 - } - fn high(self) -> i32 { - self.wrapping_shr(32) as i32 - } - fn from_parts(low: u32, high: i32) -> i64 { - u64::from_parts(low, high as u32) as i64 - } - } - #[cfg(not(stage0))] impl LargeInt for u128 { type LowHalf = u64; type HighHalf = u64; @@ -410,7 +352,6 @@ pub mod reimpls { (high as u128).wrapping_shl(64) | low as u128 } } - #[cfg(not(stage0))] impl LargeInt for i128 { type LowHalf = u64; type HighHalf = i64; @@ -455,47 +396,31 @@ pub mod reimpls { }} } - #[cfg(stage0)] #[export_name="__multi3"] - pub extern "C" fn u128_mul(a: i128_, b: i128_) -> i128_ { - ((a as i64).wrapping_mul(b as i64) as i128_) - } - - #[cfg(not(stage0))] - #[export_name="__multi3"] - pub extern "C" fn u128_mul(a: i128_, b: i128_) -> i128_ { - mul!(a, b, i128_, i64) + pub extern "C" fn u128_mul(a: i128, b: i128) -> i128 { + mul!(a, b, i128, i64) } trait AbsExt: Sized { - fn uabs(self) -> u128_ { - self.iabs() as u128_ - } - fn iabs(self) -> i128_; - } - - #[cfg(stage0)] - impl AbsExt for i128_ { - fn iabs(self) -> i128_ { - let s = self >> 63; - ((self ^ s).wrapping_sub(s)) + fn uabs(self) -> u128 { + self.iabs() as u128 } + fn iabs(self) -> i128; } - #[cfg(not(stage0))] - impl AbsExt for i128_ { - fn iabs(self) -> i128_ { + impl AbsExt for i128 { + fn iabs(self) -> i128 { let s = self >> 127; ((self ^ s).wrapping_sub(s)) } } trait NegExt: Sized { - fn unchecked_neg(self) -> i128_; + fn unchecked_neg(self) -> i128; } - impl NegExt for i128_ { - fn unchecked_neg(self) -> i128_ { + impl NegExt for i128 { + fn unchecked_neg(self) -> i128 { (!self).wrapping_add(1) } } @@ -551,9 +476,9 @@ pub mod reimpls { let exponent = $from.get_exponent(); let mantissa_fraction = repr & <$fromty as FloatStuff>::MANTISSA_MASK; let mantissa = mantissa_fraction | <$fromty as FloatStuff>::MANTISSA_LEAD_BIT; - if sign == -1.0 || exponent < 0 { return 0 as u128_; } + if sign == -1.0 || exponent < 0 { return 0 as u128; } if exponent > ::core::mem::size_of::<$outty>() as i32 * 8 { - return !(0 as u128_); + return !(0 as u128); } (if exponent < (<$fromty as FloatStuff>::MANTISSA_BITS) as i32 { (mantissa as $outty) @@ -576,7 +501,7 @@ pub mod reimpls { let mantissa_fraction = repr & <$fromty as FloatStuff>::MANTISSA_MASK; let mantissa = mantissa_fraction | <$fromty as FloatStuff>::MANTISSA_LEAD_BIT; - if exponent < 0 { return 0 as i128_; } + if exponent < 0 { return 0 as i128; } if exponent > ::core::mem::size_of::<$outty>() as i32 * 8 { let ret = if sign > 0.0 { <$outty>::max_value() } else { <$outty>::min_value() }; return ret @@ -595,7 +520,7 @@ pub mod reimpls { } - fn i128_as_f64(a: i128_) -> f64 { + fn i128_as_f64(a: i128) -> f64 { match a.signum() { 1 => u128_as_f64(a.uabs()), 0 => 0.0, @@ -603,7 +528,7 @@ pub mod reimpls { } } - fn i128_as_f32(a: i128_) -> f32 { + fn i128_as_f32(a: i128) -> f32 { match a.signum() { 1 => u128_as_f32(a.uabs()), 0 => 0.0, @@ -611,7 +536,7 @@ pub mod reimpls { } } - fn u128_as_f64(mut a: u128_) -> f64 { + fn u128_as_f64(mut a: u128) -> f64 { use ::core::f64::MANTISSA_DIGITS; if a == 0 { return 0.0; } let sd = 128u32.wrapping_sub(a.leading_zeros()); @@ -620,7 +545,7 @@ pub mod reimpls { const MD2 : u32 = MANTISSA_DIGITS + 2; // SNAP: replace this with !0u128 - let negn :u128_ = !0; + let negn :u128 = !0; if sd > MANTISSA_DIGITS { a = match sd { @@ -628,7 +553,7 @@ pub mod reimpls { MD2 => a, _ => a.wrapping_shr(sd.wrapping_sub(MANTISSA_DIGITS + 2)) | (if (a & (negn.wrapping_shr(128 + MANTISSA_DIGITS + 2) - .wrapping_sub(sd as u128_))) == 0 { 0 } else { 1 }) + .wrapping_sub(sd as u128))) == 0 { 0 } else { 1 }) }; a |= if (a & 4) == 0 { 0 } else { 1 }; a = a.wrapping_add(1); @@ -646,7 +571,7 @@ pub mod reimpls { } } - fn u128_as_f32(mut a: u128_) -> f32 { + fn u128_as_f32(mut a: u128) -> f32 { use ::core::f32::MANTISSA_DIGITS; if a == 0 { return 0.0; } let sd = 128u32.wrapping_sub(a.leading_zeros()); @@ -655,7 +580,7 @@ pub mod reimpls { const MD2 : u32 = MANTISSA_DIGITS + 2; // SNAP: replace this with !0u128 - let negn :u128_ = !0; + let negn :u128 = !0; if sd > MANTISSA_DIGITS { a = match sd { @@ -663,7 +588,7 @@ pub mod reimpls { MD2 => a, _ => a.wrapping_shr(sd.wrapping_sub(MANTISSA_DIGITS + 2)) | (if (a & (negn.wrapping_shr(128 + MANTISSA_DIGITS + 2) - .wrapping_sub(sd as u128_))) == 0 { 0 } else { 1 }) + .wrapping_sub(sd as u128))) == 0 { 0 } else { 1 }) }; a |= if (a & 4) == 0 { 0 } else { 1 }; a = a.wrapping_add(1); @@ -684,7 +609,7 @@ pub mod reimpls { macro_rules! why_are_abi_strings_checked_by_parser { ($cret:ty, $conv:expr, $unadj:tt) => { mod imp { - use super::{i128_, u128_, LargeInt, FloatStuff, NegExt, AbsExt}; + use super::{LargeInt, FloatStuff, NegExt, AbsExt}; use super::{i128_as_f64, i128_as_f32, u128_as_f64, u128_as_f32, i128_div, i128_mod, u128_div_mod, unchecked_div, ptr}; // For x64 @@ -692,8 +617,8 @@ pub mod reimpls { // aka. // define i128 @__muloti4(i128, i128, i32*) #[export_name="__muloti4"] - pub unsafe extern $unadj fn i128_mul_oflow(a: i128_, b: i128_, o: *mut i32) -> i128_ { - mulo!(a, b, o, i128_) + pub unsafe extern $unadj fn i128_mul_oflow(a: i128, b: i128, o: *mut i32) -> i128 { + mulo!(a, b, o, i128) } // For x64 @@ -701,19 +626,19 @@ pub mod reimpls { // aka. // define double @__muloti4(i128) #[export_name="__floattidf"] - pub extern $unadj fn i128_as_f64_(a: i128_) -> f64 { + pub extern $unadj fn i128_as_f64_(a: i128) -> f64 { i128_as_f64(a) } #[export_name="__floattisf"] - pub extern $unadj fn i128_as_f32_(a: i128_) -> f32 { + pub extern $unadj fn i128_as_f32_(a: i128) -> f32 { i128_as_f32(a) } #[export_name="__floatuntidf"] - pub extern $unadj fn u128_as_f64_(a: u128_) -> f64 { + pub extern $unadj fn u128_as_f64_(a: u128) -> f64 { u128_as_f64(a) } #[export_name="__floatuntisf"] - pub extern $unadj fn u128_as_f32_(a: u128_) -> f32 { + pub extern $unadj fn u128_as_f32_(a: u128) -> f32 { u128_as_f32(a) } @@ -722,23 +647,23 @@ pub mod reimpls { // aka. // define i128 @stuff(double) #[export_name="__fixunsdfti"] - pub extern $unadj fn f64_as_u128(a: f64) -> u128_ { - float_as_unsigned!(a, f64, u128_) + pub extern $unadj fn f64_as_u128(a: f64) -> u128 { + float_as_unsigned!(a, f64, u128) } #[export_name="__fixunssfti"] - pub extern "unadjusted" fn f32_as_u128(a: f32) -> u128_ { - float_as_unsigned!(a, f32, u128_) + pub extern "unadjusted" fn f32_as_u128(a: f32) -> u128 { + float_as_unsigned!(a, f32, u128) } #[export_name="__fixdfti"] - pub extern "unadjusted" fn f64_as_i128(a: f64) -> i128_ { - float_as_signed!(a, f64, i128_) + pub extern "unadjusted" fn f64_as_i128(a: f64) -> i128 { + float_as_signed!(a, f64, i128) } #[export_name="__fixsfti"] - pub extern "unadjusted" fn f32_as_i128(a: f32) -> i128_ { - float_as_signed!(a, f32, i128_) + pub extern "unadjusted" fn f32_as_i128(a: f32) -> i128 { + float_as_signed!(a, f32, i128) } #[repr(simd)] @@ -751,19 +676,19 @@ pub mod reimpls { // // That almost matches the C ABI, so we simply use the C ABI #[export_name="__udivmodti4"] - pub extern "C" fn u128_div_mod_(n: u128_, d: u128_, rem: *mut u128_) -> $cret { + pub extern "C" fn u128_div_mod_(n: u128, d: u128, rem: *mut u128) -> $cret { let x = u128_div_mod(n, d, rem); ($conv)(x) } #[export_name="__udivti3"] - pub extern "C" fn u128_div_(a: u128_, b: u128_) -> $cret { + pub extern "C" fn u128_div_(a: u128, b: u128) -> $cret { let x = u128_div_mod(a, b, ptr::null_mut()); ($conv)(x) } #[export_name="__umodti3"] - pub extern "C" fn u128_mod_(a: u128_, b: u128_) -> $cret { + pub extern "C" fn u128_mod_(a: u128, b: u128) -> $cret { unsafe { let mut r = ::core::mem::zeroed(); u128_div_mod(a, b, &mut r); @@ -772,30 +697,26 @@ pub mod reimpls { } #[export_name="__divti3"] - pub extern "C" fn i128_div_(a: i128_, b: i128_) -> $cret { + pub extern "C" fn i128_div_(a: i128, b: i128) -> $cret { let x = i128_div(a, b); - ($conv)(x as u128_) + ($conv)(x as u128) } #[export_name="__modti3"] - pub extern "C" fn i128_mod_(a: i128_, b: i128_) -> $cret { + pub extern "C" fn i128_mod_(a: i128, b: i128) -> $cret { let x = i128_mod(a, b); - ($conv)(x as u128_) + ($conv)(x as u128) } } } } // LLVM expectations for ABI on windows x64 are pure madness. - #[cfg(not(stage0))] #[cfg(all(windows, target_pointer_width="64"))] why_are_abi_strings_checked_by_parser!(u64x2, - |i: u128_| u64x2(i.low(), i.high()), + |i: u128| u64x2(i.low(), i.high()), "unadjusted"); - #[cfg(not(stage0))] #[cfg(not(all(windows, target_pointer_width="64")))] - why_are_abi_strings_checked_by_parser!(u128_, |i|{ i }, "C"); - - #[cfg(not(stage0))] + why_are_abi_strings_checked_by_parser!(u128, |i|{ i }, "C"); pub use self::imp::*; } diff --git a/src/libcore/clone.rs b/src/libcore/clone.rs index cd2e8f10181..8dbbc5928f4 100644 --- a/src/libcore/clone.rs +++ b/src/libcore/clone.rs @@ -153,7 +153,6 @@ clone_impl! { i8 } clone_impl! { i16 } clone_impl! { i32 } clone_impl! { i64 } -#[cfg(not(stage0))] clone_impl! { i128 } clone_impl! { usize } @@ -161,7 +160,6 @@ clone_impl! { u8 } clone_impl! { u16 } clone_impl! { u32 } clone_impl! { u64 } -#[cfg(not(stage0))] clone_impl! { u128 } clone_impl! { f32 } diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs index a78d27ea3af..cc066099cf8 100644 --- a/src/libcore/cmp.rs +++ b/src/libcore/cmp.rs @@ -679,10 +679,8 @@ mod impls { } partial_eq_impl! { - bool char usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 + bool char usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 } - #[cfg(not(stage0))] - partial_eq_impl! { u128 i128 } macro_rules! eq_impl { ($($t:ty)*) => ($( @@ -691,9 +689,7 @@ mod impls { )*) } - eq_impl! { () bool char usize u8 u16 u32 u64 isize i8 i16 i32 i64 } - #[cfg(not(stage0))] - eq_impl! { u128 i128 } + eq_impl! { () bool char usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 } macro_rules! partial_ord_impl { ($($t:ty)*) => ($( @@ -782,9 +778,7 @@ mod impls { } } - ord_impl! { char usize u8 u16 u32 u64 isize i8 i16 i32 i64 } - #[cfg(not(stage0))] - ord_impl! { u128 i128 } + ord_impl! { char usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 } #[unstable(feature = "never_type_impls", issue = "35121")] impl PartialEq for ! { diff --git a/src/libcore/default.rs b/src/libcore/default.rs index ccd4343336f..0d7c1672fbc 100644 --- a/src/libcore/default.rs +++ b/src/libcore/default.rs @@ -144,7 +144,6 @@ default_impl! { u8, 0 } default_impl! { u16, 0 } default_impl! { u32, 0 } default_impl! { u64, 0 } -#[cfg(not(stage0))] default_impl! { u128, 0 } default_impl! { isize, 0 } @@ -152,7 +151,6 @@ default_impl! { i8, 0 } default_impl! { i16, 0 } default_impl! { i32, 0 } default_impl! { i64, 0 } -#[cfg(not(stage0))] default_impl! { i128, 0 } default_impl! { f32, 0.0f32 } diff --git a/src/libcore/fmt/num.rs b/src/libcore/fmt/num.rs index cd725392b66..a324a4aed25 100644 --- a/src/libcore/fmt/num.rs +++ b/src/libcore/fmt/num.rs @@ -30,7 +30,6 @@ trait Int: Zero + PartialEq + PartialOrd + Div<Output=Self> + Rem<Output=Self> + fn to_u16(&self) -> u16; fn to_u32(&self) -> u32; fn to_u64(&self) -> u64; - #[cfg(not(stage0))] fn to_u128(&self) -> u128; } @@ -41,13 +40,10 @@ macro_rules! doit { fn to_u16(&self) -> u16 { *self as u16 } fn to_u32(&self) -> u32 { *self as u32 } fn to_u64(&self) -> u64 { *self as u64 } - #[cfg(not(stage0))] fn to_u128(&self) -> u128 { *self as u128 } })*) } -doit! { i8 i16 i32 i64 isize u8 u16 u32 u64 usize } -#[cfg(not(stage0))] -doit! { i128 u128 } +doit! { i8 i16 i32 i64 i128 isize u8 u16 u32 u64 u128 usize } /// A type that represents a specific radix #[doc(hidden)] @@ -188,7 +184,6 @@ integer! { i8, u8 } integer! { i16, u16 } integer! { i32, u32 } integer! { i64, u64 } -#[cfg(not(stage0))] integer! { i128, u128 } const DEC_DIGITS_LUT: &'static[u8] = @@ -265,7 +260,6 @@ macro_rules! impl_Display { impl_Display!(i8, u8, i16, u16, i32, u32: to_u32); impl_Display!(i64, u64: to_u64); -#[cfg(not(stage0))] impl_Display!(i128, u128: to_u128); #[cfg(target_pointer_width = "16")] impl_Display!(isize, usize: to_u16); diff --git a/src/libcore/hash/mod.rs b/src/libcore/hash/mod.rs index dd6edc7d39a..f0d8d1a3219 100644 --- a/src/libcore/hash/mod.rs +++ b/src/libcore/hash/mod.rs @@ -186,7 +186,6 @@ pub trait Hasher { fn write_u64(&mut self, i: u64) { self.write(&unsafe { mem::transmute::<_, [u8; 8]>(i) }) } - #[cfg(not(stage0))] /// Writes a single `u128` into this hasher. #[inline] #[unstable(feature = "i128", issue = "35118")] @@ -227,7 +226,6 @@ pub trait Hasher { fn write_i64(&mut self, i: i64) { self.write_u64(i as u64) } - #[cfg(not(stage0))] /// Writes a single `i128` into this hasher. #[inline] #[unstable(feature = "i128", issue = "35118")] @@ -376,9 +374,6 @@ mod impls { (i32, write_i32), (i64, write_i64), (isize, write_isize), - } - #[cfg(not(stage0))] - impl_write! { (u128, write_u128), (i128, write_i128), } diff --git a/src/libcore/iter/range.rs b/src/libcore/iter/range.rs index 9d22037882f..687c477f19e 100644 --- a/src/libcore/iter/range.rs +++ b/src/libcore/iter/range.rs @@ -242,7 +242,6 @@ step_impl_signed!(i64); // assume here that it is less than 64-bits. #[cfg(not(target_pointer_width = "64"))] step_impl_no_between!(u64 i64); -#[cfg(not(stage0))] step_impl_no_between!(u128 i128); /// An adapter for stepping range iterators by a custom amount. diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs index 98871bd084e..3d124a8aa8b 100644 --- a/src/libcore/lib.rs +++ b/src/libcore/lib.rs @@ -89,7 +89,7 @@ #![feature(staged_api)] #![feature(unboxed_closures)] #![feature(never_type)] -#![cfg_attr(not(stage0), feature(i128_type))] +#![feature(i128_type)] #![feature(prelude_import)] #[prelude_import] @@ -119,9 +119,6 @@ mod uint_macros; #[path = "num/i16.rs"] pub mod i16; #[path = "num/i32.rs"] pub mod i32; #[path = "num/i64.rs"] pub mod i64; - -// SNAP -#[cfg(not(stage0))] #[path = "num/i128.rs"] pub mod i128; #[path = "num/usize.rs"] pub mod usize; @@ -129,9 +126,6 @@ mod uint_macros; #[path = "num/u16.rs"] pub mod u16; #[path = "num/u32.rs"] pub mod u32; #[path = "num/u64.rs"] pub mod u64; - -// SNAP -#[cfg(not(stage0))] #[path = "num/u128.rs"] pub mod u128; #[path = "num/f32.rs"] pub mod f32; diff --git a/src/libcore/nonzero.rs b/src/libcore/nonzero.rs index 539ad00bd30..d7382501bc3 100644 --- a/src/libcore/nonzero.rs +++ b/src/libcore/nonzero.rs @@ -30,9 +30,7 @@ unsafe impl Zeroable for i32 {} unsafe impl Zeroable for u32 {} unsafe impl Zeroable for i64 {} unsafe impl Zeroable for u64 {} -#[cfg(not(stage0))] unsafe impl Zeroable for i128 {} -#[cfg(not(stage0))] unsafe impl Zeroable for u128 {} /// A wrapper type for raw pointers and integers that will never be diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 61c687313dc..e907eae18bc 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -144,9 +144,7 @@ macro_rules! zero_one_impl { } )*) } -zero_one_impl! { u8 u16 u32 u64 usize i8 i16 i32 i64 isize } -#[cfg(not(stage0))] -zero_one_impl! { u128 i128 } +zero_one_impl! { u8 u16 u32 u64 u128 usize i8 i16 i32 i64 i128 isize } macro_rules! zero_one_impl_float { ($($t:ty)*) => ($( @@ -1300,8 +1298,6 @@ impl i64 { intrinsics::mul_with_overflow } } -// SNAP -#[cfg(not(stage0))] #[lang = "i128"] impl i128 { int_impl! { i128, u128, 128, @@ -2342,8 +2338,6 @@ impl u64 { intrinsics::mul_with_overflow } } -// SNAP -#[cfg(not(stage0))] #[lang = "u128"] impl u128 { uint_impl! { u128, 128, @@ -2568,9 +2562,7 @@ macro_rules! from_str_radix_int_impl { } )*} } -from_str_radix_int_impl! { isize i8 i16 i32 i64 usize u8 u16 u32 u64 } -#[cfg(not(stage0))] -from_str_radix_int_impl! { u128 i128 } +from_str_radix_int_impl! { isize i8 i16 i32 i64 i128 usize u8 u16 u32 u64 u128 } /// The error type returned when a checked integral type conversion fails. #[unstable(feature = "try_from", issue = "33417")] @@ -2614,50 +2606,17 @@ macro_rules! same_sign_try_from_int_impl { )*} } -#[cfg(stage0)] -same_sign_try_from_int_impl!(u64, u8, u8, u16, u32, u64, usize); -#[cfg(stage0)] -same_sign_try_from_int_impl!(i64, i8, i8, i16, i32, i64, isize); -#[cfg(stage0)] -same_sign_try_from_int_impl!(u64, u16, u8, u16, u32, u64, usize); -#[cfg(stage0)] -same_sign_try_from_int_impl!(i64, i16, i8, i16, i32, i64, isize); -#[cfg(stage0)] -same_sign_try_from_int_impl!(u64, u32, u8, u16, u32, u64, usize); -#[cfg(stage0)] -same_sign_try_from_int_impl!(i64, i32, i8, i16, i32, i64, isize); -#[cfg(stage0)] -same_sign_try_from_int_impl!(u64, u64, u8, u16, u32, u64, usize); -#[cfg(stage0)] -same_sign_try_from_int_impl!(i64, i64, i8, i16, i32, i64, isize); -#[cfg(stage0)] -same_sign_try_from_int_impl!(u64, usize, u8, u16, u32, u64, usize); -#[cfg(stage0)] -same_sign_try_from_int_impl!(i64, isize, i8, i16, i32, i64, isize); - -#[cfg(not(stage0))] same_sign_try_from_int_impl!(u128, u8, u8, u16, u32, u64, u128, usize); -#[cfg(not(stage0))] same_sign_try_from_int_impl!(i128, i8, i8, i16, i32, i64, i128, isize); -#[cfg(not(stage0))] same_sign_try_from_int_impl!(u128, u16, u8, u16, u32, u64, u128, usize); -#[cfg(not(stage0))] same_sign_try_from_int_impl!(i128, i16, i8, i16, i32, i64, i128, isize); -#[cfg(not(stage0))] same_sign_try_from_int_impl!(u128, u32, u8, u16, u32, u64, u128, usize); -#[cfg(not(stage0))] same_sign_try_from_int_impl!(i128, i32, i8, i16, i32, i64, i128, isize); -#[cfg(not(stage0))] same_sign_try_from_int_impl!(u128, u64, u8, u16, u32, u64, u128, usize); -#[cfg(not(stage0))] same_sign_try_from_int_impl!(i128, i64, i8, i16, i32, i64, i128, isize); -#[cfg(not(stage0))] same_sign_try_from_int_impl!(u128, u128, u8, u16, u32, u64, u128, usize); -#[cfg(not(stage0))] same_sign_try_from_int_impl!(i128, i128, i8, i16, i32, i64, i128, isize); -#[cfg(not(stage0))] same_sign_try_from_int_impl!(u128, usize, u8, u16, u32, u64, u128, usize); -#[cfg(not(stage0))] same_sign_try_from_int_impl!(i128, isize, i8, i16, i32, i64, i128, isize); macro_rules! cross_sign_from_int_impl { @@ -2692,28 +2651,11 @@ macro_rules! cross_sign_from_int_impl { )*} } -#[cfg(stage0)] -cross_sign_from_int_impl!(u8, i8, i16, i32, i64, isize); -#[cfg(stage0)] -cross_sign_from_int_impl!(u16, i8, i16, i32, i64, isize); -#[cfg(stage0)] -cross_sign_from_int_impl!(u32, i8, i16, i32, i64, isize); -#[cfg(stage0)] -cross_sign_from_int_impl!(u64, i8, i16, i32, i64, isize); -#[cfg(stage0)] -cross_sign_from_int_impl!(usize, i8, i16, i32, i64, isize); - -#[cfg(not(stage0))] cross_sign_from_int_impl!(u8, i8, i16, i32, i64, i128, isize); -#[cfg(not(stage0))] cross_sign_from_int_impl!(u16, i8, i16, i32, i64, i128, isize); -#[cfg(not(stage0))] cross_sign_from_int_impl!(u32, i8, i16, i32, i64, i128, isize); -#[cfg(not(stage0))] cross_sign_from_int_impl!(u64, i8, i16, i32, i64, i128, isize); -#[cfg(not(stage0))] cross_sign_from_int_impl!(u128, i8, i16, i32, i64, i128, isize); -#[cfg(not(stage0))] cross_sign_from_int_impl!(usize, i8, i16, i32, i64, i128, isize); #[doc(hidden)] @@ -2742,9 +2684,7 @@ macro_rules! doit { } })*) } -doit! { i8 i16 i32 i64 isize u8 u16 u32 u64 usize } -#[cfg(not(stage0))] -doit! { i128 u128 } +doit! { i8 i16 i32 i64 i128 isize u8 u16 u32 u64 u128 usize } fn from_str_radix<T: FromStrRadixHelper>(src: &str, radix: u32) -> Result<T, ParseIntError> { use self::IntErrorKind::*; @@ -2878,50 +2818,38 @@ macro_rules! impl_from { impl_from! { u8, u16 } impl_from! { u8, u32 } impl_from! { u8, u64 } -#[cfg(not(stage0))] impl_from! { u8, u128 } impl_from! { u8, usize } impl_from! { u16, u32 } impl_from! { u16, u64 } -#[cfg(not(stage0))] impl_from! { u16, u128 } impl_from! { u32, u64 } -#[cfg(not(stage0))] impl_from! { u32, u128 } -#[cfg(not(stage0))] impl_from! { u64, u128 } // Signed -> Signed impl_from! { i8, i16 } impl_from! { i8, i32 } impl_from! { i8, i64 } -#[cfg(not(stage0))] impl_from! { i8, i128 } impl_from! { i8, isize } impl_from! { i16, i32 } impl_from! { i16, i64 } -#[cfg(not(stage0))] impl_from! { i16, i128 } impl_from! { i32, i64 } -#[cfg(not(stage0))] impl_from! { i32, i128 } -#[cfg(not(stage0))] impl_from! { i64, i128 } // Unsigned -> Signed impl_from! { u8, i16 } impl_from! { u8, i32 } impl_from! { u8, i64 } -#[cfg(not(stage0))] impl_from! { u8, i128 } impl_from! { u16, i32 } impl_from! { u16, i64 } -#[cfg(not(stage0))] impl_from! { u16, i128 } impl_from! { u32, i64 } -#[cfg(not(stage0))] impl_from! { u32, i128 } -#[cfg(not(stage0))] impl_from! { u64, i128 } // Note: integers can only be represented with full precision in a float if diff --git a/src/libcore/num/wrapping.rs b/src/libcore/num/wrapping.rs index b3c2c25551e..50007c7d9b0 100644 --- a/src/libcore/num/wrapping.rs +++ b/src/libcore/num/wrapping.rs @@ -297,9 +297,7 @@ macro_rules! wrapping_impl { )*) } -wrapping_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 } -#[cfg(not(stage0))] -wrapping_impl! { u128 i128 } +wrapping_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 } mod shift_max { #![allow(non_upper_case_globals)] diff --git a/src/libcore/ops.rs b/src/libcore/ops.rs index 9ff4725c9b3..566fb89365a 100644 --- a/src/libcore/ops.rs +++ b/src/libcore/ops.rs @@ -267,9 +267,7 @@ macro_rules! add_impl { )*) } -add_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 } -#[cfg(not(stage0))] -add_impl! { u128 i128 } +add_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 } /// The `Sub` trait is used to specify the functionality of `-`. /// @@ -342,9 +340,7 @@ macro_rules! sub_impl { )*) } -sub_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 } -#[cfg(not(stage0))] -sub_impl! { u128 i128 } +sub_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 } /// The `Mul` trait is used to specify the functionality of `*`. /// @@ -466,9 +462,7 @@ macro_rules! mul_impl { )*) } -mul_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 } -#[cfg(not(stage0))] -mul_impl! { u128 i128 } +mul_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 } /// The `Div` trait is used to specify the functionality of `/`. /// @@ -597,9 +591,7 @@ macro_rules! div_impl_integer { )*) } -div_impl_integer! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 } -#[cfg(not(stage0))] -div_impl_integer! { u128 i128 } +div_impl_integer! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 } macro_rules! div_impl_float { ($($t:ty)*) => ($( @@ -678,9 +670,7 @@ macro_rules! rem_impl_integer { )*) } -rem_impl_integer! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 } -#[cfg(not(stage0))] -rem_impl_integer! { u128 i128 } +rem_impl_integer! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 } macro_rules! rem_impl_float { @@ -776,9 +766,7 @@ macro_rules! neg_impl_unsigned { } // neg_impl_unsigned! { usize u8 u16 u32 u64 } -neg_impl_numeric! { isize i8 i16 i32 i64 f32 f64 } -#[cfg(not(stage0))] -neg_impl_numeric! { i128 } +neg_impl_numeric! { isize i8 i16 i32 i64 i128 f32 f64 } /// The `Not` trait is used to specify the functionality of unary `!`. /// @@ -836,9 +824,7 @@ macro_rules! not_impl { )*) } -not_impl! { bool usize u8 u16 u32 u64 isize i8 i16 i32 i64 } -#[cfg(not(stage0))] -not_impl! { u128 i128 } +not_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 } /// The `BitAnd` trait is used to specify the functionality of `&`. /// @@ -921,9 +907,7 @@ macro_rules! bitand_impl { )*) } -bitand_impl! { bool usize u8 u16 u32 u64 isize i8 i16 i32 i64 } -#[cfg(not(stage0))] -bitand_impl! { u128 i128 } +bitand_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 } /// The `BitOr` trait is used to specify the functionality of `|`. /// @@ -1006,9 +990,7 @@ macro_rules! bitor_impl { )*) } -bitor_impl! { bool usize u8 u16 u32 u64 isize i8 i16 i32 i64 } -#[cfg(not(stage0))] -bitor_impl! { u128 i128 } +bitor_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 } /// The `BitXor` trait is used to specify the functionality of `^`. /// @@ -1094,9 +1076,7 @@ macro_rules! bitxor_impl { )*) } -bitxor_impl! { bool usize u8 u16 u32 u64 isize i8 i16 i32 i64 } -#[cfg(not(stage0))] -bitxor_impl! { u128 i128 } +bitxor_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 } /// The `Shl` trait is used to specify the functionality of `<<`. /// @@ -1187,7 +1167,6 @@ macro_rules! shl_impl_all { shl_impl! { $t, u16 } shl_impl! { $t, u32 } shl_impl! { $t, u64 } - #[cfg(not(stage0))] shl_impl! { $t, u128 } shl_impl! { $t, usize } @@ -1195,15 +1174,12 @@ macro_rules! shl_impl_all { shl_impl! { $t, i16 } shl_impl! { $t, i32 } shl_impl! { $t, i64 } - #[cfg(not(stage0))] shl_impl! { $t, i128 } shl_impl! { $t, isize } )*) } -shl_impl_all! { u8 u16 u32 u64 usize i8 i16 i32 i64 isize } -#[cfg(not(stage0))] -shl_impl_all! { u128 i128 } +shl_impl_all! { u8 u16 u32 u64 u128 usize i8 i16 i32 i64 isize i128 } /// The `Shr` trait is used to specify the functionality of `>>`. /// @@ -1294,7 +1270,6 @@ macro_rules! shr_impl_all { shr_impl! { $t, u16 } shr_impl! { $t, u32 } shr_impl! { $t, u64 } - #[cfg(not(stage0))] shr_impl! { $t, u128 } shr_impl! { $t, usize } @@ -1302,15 +1277,12 @@ macro_rules! shr_impl_all { shr_impl! { $t, i16 } shr_impl! { $t, i32 } shr_impl! { $t, i64 } - #[cfg(not(stage0))] shr_impl! { $t, i128 } shr_impl! { $t, isize } )*) } -shr_impl_all! { u8 u16 u32 u64 usize i8 i16 i32 i64 isize } -#[cfg(not(stage0))] -shr_impl_all! { u128 i128 } +shr_impl_all! { u8 u16 u32 u64 u128 usize i8 i16 i32 i64 i128 isize } /// The `AddAssign` trait is used to specify the functionality of `+=`. /// @@ -1366,9 +1338,7 @@ macro_rules! add_assign_impl { )+) } -add_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 } -#[cfg(not(stage0))] -add_assign_impl! { u128 i128 } +add_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 } /// The `SubAssign` trait is used to specify the functionality of `-=`. /// @@ -1424,9 +1394,7 @@ macro_rules! sub_assign_impl { )+) } -sub_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 } -#[cfg(not(stage0))] -sub_assign_impl! { u128 i128 } +sub_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 } /// The `MulAssign` trait is used to specify the functionality of `*=`. /// @@ -1471,9 +1439,7 @@ macro_rules! mul_assign_impl { )+) } -mul_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 } -#[cfg(not(stage0))] -mul_assign_impl! { u128 i128 } +mul_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 } /// The `DivAssign` trait is used to specify the functionality of `/=`. /// @@ -1517,9 +1483,7 @@ macro_rules! div_assign_impl { )+) } -div_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 } -#[cfg(not(stage0))] -div_assign_impl! { u128 i128 } +div_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 } /// The `RemAssign` trait is used to specify the functionality of `%=`. /// @@ -1563,9 +1527,7 @@ macro_rules! rem_assign_impl { )+) } -rem_assign_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 } -#[cfg(not(stage0))] -rem_assign_impl! { u128 i128 } +rem_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 } /// The `BitAndAssign` trait is used to specify the functionality of `&=`. /// @@ -1651,9 +1613,7 @@ macro_rules! bitand_assign_impl { )+) } -bitand_assign_impl! { bool usize u8 u16 u32 u64 isize i8 i16 i32 i64 } -#[cfg(not(stage0))] -bitand_assign_impl! { u128 i128 } +bitand_assign_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 } /// The `BitOrAssign` trait is used to specify the functionality of `|=`. /// @@ -1697,9 +1657,7 @@ macro_rules! bitor_assign_impl { )+) } -bitor_assign_impl! { bool usize u8 u16 u32 u64 isize i8 i16 i32 i64 } -#[cfg(not(stage0))] -bitor_assign_impl! { u128 i128 } +bitor_assign_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 } /// The `BitXorAssign` trait is used to specify the functionality of `^=`. /// @@ -1743,9 +1701,7 @@ macro_rules! bitxor_assign_impl { )+) } -bitxor_assign_impl! { bool usize u8 u16 u32 u64 isize i8 i16 i32 i64 } -#[cfg(not(stage0))] -bitxor_assign_impl! { u128 i128 } +bitxor_assign_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 } /// The `ShlAssign` trait is used to specify the functionality of `<<=`. /// @@ -1798,7 +1754,6 @@ macro_rules! shl_assign_impl_all { shl_assign_impl! { $t, u16 } shl_assign_impl! { $t, u32 } shl_assign_impl! { $t, u64 } - #[cfg(not(stage0))] shl_assign_impl! { $t, u128 } shl_assign_impl! { $t, usize } @@ -1806,15 +1761,12 @@ macro_rules! shl_assign_impl_all { shl_assign_impl! { $t, i16 } shl_assign_impl! { $t, i32 } shl_assign_impl! { $t, i64 } - #[cfg(not(stage0))] shl_assign_impl! { $t, i128 } shl_assign_impl! { $t, isize } )*) } -shl_assign_impl_all! { u8 u16 u32 u64 usize i8 i16 i32 i64 isize } -#[cfg(not(stage0))] -shl_assign_impl_all! { u128 i128 } +shl_assign_impl_all! { u8 u16 u32 u64 u128 usize i8 i16 i32 i64 i128 isize } /// The `ShrAssign` trait is used to specify the functionality of `>>=`. /// @@ -1867,7 +1819,6 @@ macro_rules! shr_assign_impl_all { shr_assign_impl! { $t, u16 } shr_assign_impl! { $t, u32 } shr_assign_impl! { $t, u64 } - #[cfg(not(stage0))] shr_assign_impl! { $t, u128 } shr_assign_impl! { $t, usize } @@ -1875,15 +1826,12 @@ macro_rules! shr_assign_impl_all { shr_assign_impl! { $t, i16 } shr_assign_impl! { $t, i32 } shr_assign_impl! { $t, i64 } - #[cfg(not(stage0))] shr_assign_impl! { $t, i128 } shr_assign_impl! { $t, isize } )*) } -shr_assign_impl_all! { u8 u16 u32 u64 usize i8 i16 i32 i64 isize } -#[cfg(not(stage0))] -shr_assign_impl_all! { u128 i128 } +shr_assign_impl_all! { u8 u16 u32 u64 u128 usize i8 i16 i32 i64 i128 isize } /// The `Index` trait is used to specify the functionality of indexing operations /// like `container[index]` when used in an immutable context. diff --git a/src/librustc/Cargo.toml b/src/librustc/Cargo.toml index 3c455eb0501..5d53c60ad7f 100644 --- a/src/librustc/Cargo.toml +++ b/src/librustc/Cargo.toml @@ -19,7 +19,6 @@ rustc_const_math = { path = "../librustc_const_math" } rustc_data_structures = { path = "../librustc_data_structures" } rustc_errors = { path = "../librustc_errors" } rustc_llvm = { path = "../librustc_llvm" } -rustc_i128 = { path = "../librustc_i128" } serialize = { path = "../libserialize" } syntax = { path = "../libsyntax" } syntax_pos = { path = "../libsyntax_pos" } diff --git a/src/librustc/lib.rs b/src/librustc/lib.rs index 855f4a8197e..5c0ec8de7ec 100644 --- a/src/librustc/lib.rs +++ b/src/librustc/lib.rs @@ -30,6 +30,7 @@ #![feature(const_fn)] #![feature(core_intrinsics)] #![feature(field_init_shorthand)] +#![feature(i128_type)] #![feature(libc)] #![feature(loop_break_value)] #![feature(nonzero)] @@ -60,9 +61,6 @@ extern crate syntax_pos; extern crate serialize as rustc_serialize; // used by deriving -// SNAP: -extern crate rustc_i128; - #[macro_use] mod macros; diff --git a/src/librustc/ty/layout.rs b/src/librustc/ty/layout.rs index 78364abdaec..b5efd2cfc68 100644 --- a/src/librustc/ty/layout.rs +++ b/src/librustc/ty/layout.rs @@ -20,7 +20,6 @@ use ty::{self, Ty, TyCtxt, TypeFoldable}; use syntax::ast::{FloatTy, IntTy, UintTy}; use syntax::attr; use syntax_pos::DUMMY_SP; -use rustc_i128::u128; use rustc_const_math::ConstInt; use std::cmp; diff --git a/src/librustc_const_eval/Cargo.toml b/src/librustc_const_eval/Cargo.toml index ff028c202a8..780b2c16a32 100644 --- a/src/librustc_const_eval/Cargo.toml +++ b/src/librustc_const_eval/Cargo.toml @@ -19,4 +19,3 @@ rustc_errors = { path = "../librustc_errors" } syntax = { path = "../libsyntax" } graphviz = { path = "../libgraphviz" } syntax_pos = { path = "../libsyntax_pos" } -rustc_i128 = { path = "../librustc_i128" } diff --git a/src/librustc_const_eval/eval.rs b/src/librustc_const_eval/eval.rs index 47a98155fc4..e2e76cdfb6e 100644 --- a/src/librustc_const_eval/eval.rs +++ b/src/librustc_const_eval/eval.rs @@ -37,8 +37,6 @@ use std::cmp::Ordering; use rustc_const_math::*; use rustc_errors::DiagnosticBuilder; -use rustc_i128::{i128, u128}; - macro_rules! math { ($e:expr, $op:expr) => { match $op { diff --git a/src/librustc_const_eval/lib.rs b/src/librustc_const_eval/lib.rs index 2b6f487c2c9..198e49daabc 100644 --- a/src/librustc_const_eval/lib.rs +++ b/src/librustc_const_eval/lib.rs @@ -29,6 +29,7 @@ #![feature(box_patterns)] #![feature(box_syntax)] #![feature(const_fn)] +#![feature(i128_type)] extern crate arena; #[macro_use] extern crate syntax; @@ -41,8 +42,6 @@ extern crate rustc_errors; extern crate graphviz; extern crate syntax_pos; -extern crate rustc_i128; - // NB: This module needs to be declared first so diagnostics are // registered before they are used. pub mod diagnostics; diff --git a/src/librustc_const_math/Cargo.toml b/src/librustc_const_math/Cargo.toml index e6db1557fbe..e74c1ef693c 100644 --- a/src/librustc_const_math/Cargo.toml +++ b/src/librustc_const_math/Cargo.toml @@ -11,4 +11,3 @@ crate-type = ["dylib"] [dependencies] serialize = { path = "../libserialize" } syntax = { path = "../libsyntax" } -rustc_i128 = { path = "../librustc_i128" } diff --git a/src/librustc_const_math/int.rs b/src/librustc_const_math/int.rs index 53f185b661b..3618bfa2081 100644 --- a/src/librustc_const_math/int.rs +++ b/src/librustc_const_math/int.rs @@ -11,7 +11,6 @@ use std::cmp::Ordering; use syntax::attr::IntType; use syntax::ast::{IntTy, UintTy}; -use rustc_i128::{i128, u128}; use super::is::*; use super::us::*; @@ -54,7 +53,6 @@ macro_rules! bounds { mod ubounds { #![allow(dead_code)] - use rustc_i128::{u128, i128}; bounds!{u128: 0, i8 I8MIN I8MAX i16 I16MIN I16MAX i32 I32MIN I32MAX i64 I64MIN I64MAX i128 I128MIN I128MAX u8 U8MIN U8MAX u16 U16MIN U16MAX u32 U32MIN U32MAX u64 U64MIN U64MAX u128 U128MIN U128MAX @@ -65,12 +63,6 @@ mod ubounds { mod ibounds { #![allow(dead_code)] - use rustc_i128::i128; - #[cfg(stage0)] - pub const U64MIN: i128 = 0; - #[cfg(stage0)] - pub const U64MAX: i128 = i128::max_value(); - #[cfg(not(stage0))] bounds!(i128, u64 U64MIN U64MAX); pub const U128MIN: i128 = 0; @@ -483,10 +475,7 @@ derive_binop!(BitAnd, bitand); derive_binop!(BitOr, bitor); derive_binop!(BitXor, bitxor); -#[cfg(not(stage0))] const I128_MIN: i128 = ::std::i128::MIN; -#[cfg(stage0)] -const I128_MIN: i128 = ::std::i64::MIN; fn check_division( lhs: ConstInt, diff --git a/src/librustc_const_math/is.rs b/src/librustc_const_math/is.rs index 19ae0c91fc5..8f28ba14c6a 100644 --- a/src/librustc_const_math/is.rs +++ b/src/librustc_const_math/is.rs @@ -10,7 +10,6 @@ use syntax::ast; use super::err::*; -use rustc_i128::i128; /// Depending on the target only one variant is ever used in a compilation. /// Anything else is an error. This invariant is checked at several locations diff --git a/src/librustc_const_math/lib.rs b/src/librustc_const_math/lib.rs index d40a6aa32fd..13764ce5bbb 100644 --- a/src/librustc_const_math/lib.rs +++ b/src/librustc_const_math/lib.rs @@ -26,13 +26,11 @@ #![feature(rustc_private)] #![feature(staged_api)] #![feature(const_fn)] -#![cfg_attr(not(stage0), feature(i128))] +#![feature(i128)] +#![feature(i128_type)] extern crate syntax; -// SNAP: remove use of this crate -extern crate rustc_i128; - extern crate serialize as rustc_serialize; // used by deriving mod float; diff --git a/src/librustc_const_math/us.rs b/src/librustc_const_math/us.rs index 9ebf5cab6bb..76443f584ab 100644 --- a/src/librustc_const_math/us.rs +++ b/src/librustc_const_math/us.rs @@ -10,7 +10,6 @@ use syntax::ast; use super::err::*; -use rustc_i128::u128; /// Depending on the target only one variant is ever used in a compilation. /// Anything else is an error. This invariant is checked at several locations diff --git a/src/librustc_data_structures/Cargo.toml b/src/librustc_data_structures/Cargo.toml index bb610374810..e2e16059d98 100644 --- a/src/librustc_data_structures/Cargo.toml +++ b/src/librustc_data_structures/Cargo.toml @@ -11,4 +11,3 @@ crate-type = ["dylib"] [dependencies] log = { path = "../liblog" } serialize = { path = "../libserialize" } -rustc_i128 = { path = "../librustc_i128" } diff --git a/src/librustc_data_structures/lib.rs b/src/librustc_data_structures/lib.rs index b003cba292c..cf6bf1cf1d4 100644 --- a/src/librustc_data_structures/lib.rs +++ b/src/librustc_data_structures/lib.rs @@ -36,6 +36,7 @@ #![feature(untagged_unions)] #![feature(associated_consts)] #![feature(unsize)] +#![feature(i128_type)] #![cfg_attr(unix, feature(libc))] #![cfg_attr(test, feature(test))] @@ -47,8 +48,6 @@ extern crate serialize as rustc_serialize; // used by deriving #[cfg(unix)] extern crate libc; -extern crate rustc_i128; - pub use rustc_serialize::hex::ToHex; pub mod array_vec; diff --git a/src/librustc_data_structures/stable_hasher.rs b/src/librustc_data_structures/stable_hasher.rs index 87048eff5b7..231c01c9ab7 100644 --- a/src/librustc_data_structures/stable_hasher.rs +++ b/src/librustc_data_structures/stable_hasher.rs @@ -13,7 +13,6 @@ use std::marker::PhantomData; use std::mem; use blake2b::Blake2bHasher; use rustc_serialize::leb128; -use rustc_i128::{u128,i128}; fn write_unsigned_leb128_to_buf(buf: &mut [u8; 16], value: u64) -> usize { leb128::write_unsigned_leb128_to(value as u128, |i, v| buf[i] = v) diff --git a/src/librustc_i128/Cargo.toml b/src/librustc_i128/Cargo.toml deleted file mode 100644 index 6fd67637db7..00000000000 --- a/src/librustc_i128/Cargo.toml +++ /dev/null @@ -1,8 +0,0 @@ -[package] -authors = ["The Rust Project Developers"] -name = "rustc_i128" -version = "0.0.0" - -[lib] -name = "rustc_i128" -path = "lib.rs" diff --git a/src/librustc_i128/lib.rs b/src/librustc_i128/lib.rs deleted file mode 100644 index 80f550c7f50..00000000000 --- a/src/librustc_i128/lib.rs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2016 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. -#![allow(non_camel_case_types)] -#![cfg_attr(not(stage0), feature(i128_type))] -#![no_std] -#![crate_type="rlib"] -#![crate_name="rustc_i128"] - -#[cfg(stage0)] -pub type i128 = i64; -#[cfg(stage0)] -pub type u128 = u64; - -#[cfg(not(stage0))] -pub type i128 = int::_i128; -#[cfg(not(stage0))] -pub type u128 = int::_u128; -#[cfg(not(stage0))] -mod int { - pub type _i128 = i128; - pub type _u128 = u128; -} diff --git a/src/librustc_lint/Cargo.toml b/src/librustc_lint/Cargo.toml index 272f8b4f64d..4d5c0d7ba0a 100644 --- a/src/librustc_lint/Cargo.toml +++ b/src/librustc_lint/Cargo.toml @@ -14,6 +14,5 @@ log = { path = "../liblog" } rustc = { path = "../librustc" } rustc_back = { path = "../librustc_back" } rustc_const_eval = { path = "../librustc_const_eval" } -rustc_i128 = { path = "../librustc_i128" } syntax = { path = "../libsyntax" } syntax_pos = { path = "../libsyntax_pos" } diff --git a/src/librustc_lint/lib.rs b/src/librustc_lint/lib.rs index 18067cb8673..d1ad3730aa2 100644 --- a/src/librustc_lint/lib.rs +++ b/src/librustc_lint/lib.rs @@ -31,6 +31,7 @@ #![cfg_attr(test, feature(test))] #![feature(box_patterns)] #![feature(box_syntax)] +#![feature(i128_type)] #![feature(quote)] #![feature(rustc_diagnostic_macros)] #![feature(rustc_private)] @@ -46,8 +47,6 @@ extern crate rustc_back; extern crate rustc_const_eval; extern crate syntax_pos; -extern crate rustc_i128; - pub use rustc::lint; pub use rustc::middle; pub use rustc::session; diff --git a/src/librustc_lint/types.rs b/src/librustc_lint/types.rs index 9669efa2d86..2c3d71cd8de 100644 --- a/src/librustc_lint/types.rs +++ b/src/librustc_lint/types.rs @@ -33,8 +33,6 @@ use syntax::codemap; use rustc::hir; -use rustc_i128::{i128, u128}; - declare_lint! { UNUSED_COMPARISONS, Warn, diff --git a/src/librustc_metadata/Cargo.toml b/src/librustc_metadata/Cargo.toml index 4bd98c087f5..6f7f03ca216 100644 --- a/src/librustc_metadata/Cargo.toml +++ b/src/librustc_metadata/Cargo.toml @@ -18,7 +18,6 @@ rustc_const_math = { path = "../librustc_const_math" } rustc_data_structures = { path = "../librustc_data_structures" } rustc_errors = { path = "../librustc_errors" } rustc_llvm = { path = "../librustc_llvm" } -rustc_i128 = { path = "../librustc_i128" } serialize = { path = "../libserialize" } syntax = { path = "../libsyntax" } syntax_ext = { path = "../libsyntax_ext" } diff --git a/src/librustc_metadata/decoder.rs b/src/librustc_metadata/decoder.rs index dd44ef202dc..f4a35ea5fd0 100644 --- a/src/librustc_metadata/decoder.rs +++ b/src/librustc_metadata/decoder.rs @@ -42,7 +42,6 @@ use syntax::attr; use syntax::ast; use syntax::codemap; use syntax_pos::{self, Span, BytePos, Pos, DUMMY_SP}; -use rustc_i128::{u128, i128}; pub struct DecodeContext<'a, 'tcx: 'a> { opaque: opaque::Decoder<'a>, diff --git a/src/librustc_metadata/encoder.rs b/src/librustc_metadata/encoder.rs index b9c2f0622b6..69e1bbd7766 100644 --- a/src/librustc_metadata/encoder.rs +++ b/src/librustc_metadata/encoder.rs @@ -43,8 +43,6 @@ use rustc::hir::itemlikevisit::ItemLikeVisitor; use rustc::hir::intravisit::{Visitor, NestedVisitorMap}; use rustc::hir::intravisit; -use rustc_i128::{u128, i128}; - use super::index_builder::{FromId, IndexBuilder, Untracked}; pub struct EncodeContext<'a, 'tcx: 'a> { diff --git a/src/librustc_metadata/lib.rs b/src/librustc_metadata/lib.rs index 484e0df6583..2fbdb8c0de6 100644 --- a/src/librustc_metadata/lib.rs +++ b/src/librustc_metadata/lib.rs @@ -20,6 +20,7 @@ #![feature(box_patterns)] #![feature(conservative_impl_trait)] #![feature(core_intrinsics)] +#![feature(i128_type)] #![feature(proc_macro_internals)] #![feature(quote)] #![feature(rustc_diagnostic_macros)] @@ -44,7 +45,6 @@ extern crate rustc_back; extern crate rustc_const_math; extern crate rustc_data_structures; extern crate rustc_llvm; -extern crate rustc_i128; mod diagnostics; diff --git a/src/librustc_metadata/schema.rs b/src/librustc_metadata/schema.rs index d9c639f2bc5..d13628e9ce7 100644 --- a/src/librustc_metadata/schema.rs +++ b/src/librustc_metadata/schema.rs @@ -28,8 +28,6 @@ use syntax_pos::{self, Span}; use std::marker::PhantomData; -use rustc_i128::u128; - pub fn rustc_version() -> String { format!("rustc {}", option_env!("CFG_VERSION").unwrap_or("unknown version")) diff --git a/src/librustc_mir/Cargo.toml b/src/librustc_mir/Cargo.toml index 9f49d02f86c..531be0b6ae9 100644 --- a/src/librustc_mir/Cargo.toml +++ b/src/librustc_mir/Cargo.toml @@ -16,6 +16,5 @@ rustc_const_eval = { path = "../librustc_const_eval" } rustc_const_math = { path = "../librustc_const_math" } rustc_data_structures = { path = "../librustc_data_structures" } rustc_bitflags = { path = "../librustc_bitflags" } -rustc_i128 = { path = "../librustc_i128" } syntax = { path = "../libsyntax" } syntax_pos = { path = "../libsyntax_pos" } diff --git a/src/librustc_mir/build/expr/as_rvalue.rs b/src/librustc_mir/build/expr/as_rvalue.rs index 48690a275c2..b1e1e75912d 100644 --- a/src/librustc_mir/build/expr/as_rvalue.rs +++ b/src/librustc_mir/build/expr/as_rvalue.rs @@ -15,7 +15,6 @@ use std; use rustc_const_math::{ConstMathErr, Op}; use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::indexed_vec::Idx; -use rustc_i128::i128; use build::{BlockAnd, BlockAndExtension, Builder}; use build::expr::category::{Category, RvalueFunc}; diff --git a/src/librustc_mir/lib.rs b/src/librustc_mir/lib.rs index e7764d58d75..61ba9d90fef 100644 --- a/src/librustc_mir/lib.rs +++ b/src/librustc_mir/lib.rs @@ -22,6 +22,7 @@ Rust MIR: a lowered representation of Rust. Also: an experiment! #![feature(associated_consts)] #![feature(box_patterns)] +#![feature(i128_type)] #![feature(rustc_diagnostic_macros)] #![feature(rustc_private)] #![feature(staged_api)] @@ -40,8 +41,6 @@ extern crate syntax_pos; extern crate rustc_const_math; extern crate rustc_const_eval; -extern crate rustc_i128; - pub mod diagnostics; pub mod build; diff --git a/src/librustc_trans/Cargo.toml b/src/librustc_trans/Cargo.toml index 36d2ba4f367..fa48a63b6b8 100644 --- a/src/librustc_trans/Cargo.toml +++ b/src/librustc_trans/Cargo.toml @@ -21,7 +21,6 @@ rustc_data_structures = { path = "../librustc_data_structures" } rustc_errors = { path = "../librustc_errors" } rustc_incremental = { path = "../librustc_incremental" } rustc_llvm = { path = "../librustc_llvm" } -rustc_i128 = { path = "../librustc_i128" } rustc_platform_intrinsics = { path = "../librustc_platform_intrinsics" } syntax = { path = "../libsyntax" } syntax_pos = { path = "../libsyntax_pos" } diff --git a/src/librustc_trans/common.rs b/src/librustc_trans/common.rs index 0ba94fdfe63..01b2aeef004 100644 --- a/src/librustc_trans/common.rs +++ b/src/librustc_trans/common.rs @@ -40,8 +40,6 @@ use syntax::ast; use syntax::symbol::InternedString; use syntax_pos::Span; -use rustc_i128::u128; - pub use context::{CrateContext, SharedCrateContext}; pub fn type_is_fat_ptr<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, ty: Ty<'tcx>) -> bool { @@ -399,13 +397,6 @@ fn is_const_integral(v: ValueRef) -> bool { } #[inline] -#[cfg(stage0)] -fn hi_lo_to_u128(lo: u64, _: u64) -> u128 { - lo as u128 -} - -#[inline] -#[cfg(not(stage0))] fn hi_lo_to_u128(lo: u64, hi: u64) -> u128 { ((hi as u128) << 64) | (lo as u128) } diff --git a/src/librustc_trans/intrinsic.rs b/src/librustc_trans/intrinsic.rs index 842a21e98db..37f63e74996 100644 --- a/src/librustc_trans/intrinsic.rs +++ b/src/librustc_trans/intrinsic.rs @@ -33,8 +33,6 @@ use builder::Builder; use rustc::session::Session; use syntax_pos::Span; -use rustc_i128::u128; - use std::cmp::Ordering; use std::iter; diff --git a/src/librustc_trans/lib.rs b/src/librustc_trans/lib.rs index 659dbb441ee..21c92cb4a4a 100644 --- a/src/librustc_trans/lib.rs +++ b/src/librustc_trans/lib.rs @@ -29,6 +29,7 @@ #![feature(const_fn)] #![feature(custom_attribute)] #![allow(unused_attributes)] +#![feature(i128_type)] #![feature(libc)] #![feature(quote)] #![feature(rustc_diagnostic_macros)] @@ -53,7 +54,6 @@ extern crate rustc_const_eval; #[macro_use] #[no_link] extern crate rustc_bitflags; -extern crate rustc_i128; #[macro_use] extern crate log; #[macro_use] extern crate syntax; diff --git a/src/librustc_trans/mir/constant.rs b/src/librustc_trans/mir/constant.rs index 9ac2bea3b82..3d5e1694355 100644 --- a/src/librustc_trans/mir/constant.rs +++ b/src/librustc_trans/mir/constant.rs @@ -43,8 +43,6 @@ use std::ptr; use super::operand::{OperandRef, OperandValue}; use super::MirContext; -use rustc_i128::{u128, i128}; - /// A sized constant rvalue. /// The LLVM type might not be the same for a single Rust type, /// e.g. each enum variant would have its own LLVM struct type. diff --git a/src/libserialize/Cargo.toml b/src/libserialize/Cargo.toml index 47403b45981..a896c4a634c 100644 --- a/src/libserialize/Cargo.toml +++ b/src/libserialize/Cargo.toml @@ -7,6 +7,3 @@ version = "0.0.0" name = "serialize" path = "lib.rs" crate-type = ["dylib", "rlib"] - -[dependencies] -rustc_i128 = { path = "../librustc_i128" } diff --git a/src/libserialize/json.rs b/src/libserialize/json.rs index 3e62026f512..07417565e31 100644 --- a/src/libserialize/json.rs +++ b/src/libserialize/json.rs @@ -211,8 +211,6 @@ use std::string; use std::{char, f64, fmt, str}; use std; -use rustc_i128::{i128, u128}; - use Encodable; /// Represents a json value diff --git a/src/libserialize/leb128.rs b/src/libserialize/leb128.rs index 392f332d508..a9638717c66 100644 --- a/src/libserialize/leb128.rs +++ b/src/libserialize/leb128.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use rustc_i128::{i128, u128}; - #[inline] fn write_to_vec(vec: &mut Vec<u8>, position: usize, byte: u8) { if position == vec.len() { diff --git a/src/libserialize/lib.rs b/src/libserialize/lib.rs index 1cb83fa33da..2b31e2f4108 100644 --- a/src/libserialize/lib.rs +++ b/src/libserialize/lib.rs @@ -30,14 +30,13 @@ Core encoding and decoding interfaces. #![feature(box_syntax)] #![feature(collections)] #![feature(core_intrinsics)] +#![feature(i128_type)] #![feature(specialization)] #![feature(staged_api)] #![cfg_attr(test, feature(test))] extern crate collections; -extern crate rustc_i128; - pub use self::serialize::{Decoder, Encoder, Decodable, Encodable}; pub use self::serialize::{SpecializationError, SpecializedEncoder, SpecializedDecoder}; diff --git a/src/libserialize/opaque.rs b/src/libserialize/opaque.rs index 8a0648d5851..9c3db64d4d8 100644 --- a/src/libserialize/opaque.rs +++ b/src/libserialize/opaque.rs @@ -13,8 +13,6 @@ use std::borrow::Cow; use std::io::{self, Write}; use serialize; -use rustc_i128::{i128, u128}; - // ----------------------------------------------------------------------------- // Encoder // ----------------------------------------------------------------------------- diff --git a/src/libserialize/serialize.rs b/src/libserialize/serialize.rs index 395f2ccbe6d..ba39fcdec6f 100644 --- a/src/libserialize/serialize.rs +++ b/src/libserialize/serialize.rs @@ -20,7 +20,6 @@ use std::path; use std::rc::Rc; use std::cell::{Cell, RefCell}; use std::sync::Arc; -use rustc_i128::{i128, u128}; pub trait Encoder { type Error; @@ -333,14 +332,12 @@ impl Decodable for u64 { } } -#[cfg(not(stage0))] impl Encodable for u128 { fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { s.emit_u128(*self) } } -#[cfg(not(stage0))] impl Decodable for u128 { fn decode<D: Decoder>(d: &mut D) -> Result<u128, D::Error> { d.read_u128() @@ -407,14 +404,12 @@ impl Decodable for i64 { } } -#[cfg(not(stage0))] impl Encodable for i128 { fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { s.emit_i128(*self) } } -#[cfg(not(stage0))] impl Decodable for i128 { fn decode<D: Decoder>(d: &mut D) -> Result<i128, D::Error> { d.read_i128() diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 37632ac76f2..181694dead0 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -399,7 +399,6 @@ pub use core::i32; #[stable(feature = "rust1", since = "1.0.0")] pub use core::i64; #[unstable(feature = "i128", issue = "35118")] -#[cfg(not(stage0))] pub use core::i128; #[stable(feature = "rust1", since = "1.0.0")] pub use core::usize; @@ -430,7 +429,6 @@ pub use core_collections::vec; #[stable(feature = "rust1", since = "1.0.0")] pub use std_unicode::char; #[unstable(feature = "i128", issue = "35118")] -#[cfg(not(stage0))] pub use core::u128; pub mod f32; diff --git a/src/libsyntax/Cargo.toml b/src/libsyntax/Cargo.toml index a200da6c293..0b38f5450b6 100644 --- a/src/libsyntax/Cargo.toml +++ b/src/libsyntax/Cargo.toml @@ -15,4 +15,3 @@ rustc_bitflags = { path = "../librustc_bitflags" } syntax_pos = { path = "../libsyntax_pos" } rustc_errors = { path = "../librustc_errors" } rustc_data_structures = { path = "../librustc_data_structures" } -rustc_i128 = { path = "../librustc_i128" } diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index d18215be3e6..09fb369cd35 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -33,8 +33,6 @@ use std::u32; use serialize::{self, Encodable, Decodable, Encoder, Decoder}; -use rustc_i128::{u128, i128}; - /// An identifier contains a Name (index into the interner /// table) and a SyntaxContext to track renaming and /// macro expansion per Flatt et al., "Macros That Work Together" diff --git a/src/libsyntax/ext/build.rs b/src/libsyntax/ext/build.rs index 1837fa1e5fe..f8d4eff80b2 100644 --- a/src/libsyntax/ext/build.rs +++ b/src/libsyntax/ext/build.rs @@ -16,7 +16,6 @@ use codemap::{dummy_spanned, respan, Spanned}; use ext::base::ExtCtxt; use ptr::P; use symbol::{Symbol, keywords}; -use rustc_i128::u128; // Transitional reexports so qquote can find the paths it is looking for mod syntax { diff --git a/src/libsyntax/ext/quote.rs b/src/libsyntax/ext/quote.rs index 8258a7427b6..6c46f90f3d4 100644 --- a/src/libsyntax/ext/quote.rs +++ b/src/libsyntax/ext/quote.rs @@ -41,7 +41,6 @@ pub mod rt { pub use parse::new_parser_from_tts; pub use syntax_pos::{BytePos, Span, DUMMY_SP}; pub use codemap::{dummy_spanned}; - use rustc_i128::{u128}; pub trait ToTokens { fn to_tokens(&self, _cx: &ExtCtxt) -> Vec<TokenTree>; diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs index 871e6b3783a..25be9e91a6a 100644 --- a/src/libsyntax/lib.rs +++ b/src/libsyntax/lib.rs @@ -33,6 +33,7 @@ #![feature(unicode)] #![feature(rustc_diagnostic_macros)] #![feature(specialization)] +#![feature(i128_type)] extern crate serialize; #[macro_use] extern crate log; @@ -42,8 +43,6 @@ pub extern crate rustc_errors as errors; extern crate syntax_pos; extern crate rustc_data_structures; -extern crate rustc_i128; - extern crate serialize as rustc_serialize; // used by deriving // A variant of 'try!' that panics on an Err. This is used as a crutch on the diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index f1a3b523cfd..20e80afc115 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -28,8 +28,6 @@ use std::path::{Path, PathBuf}; use std::rc::Rc; use std::str; -use rustc_i128::u128; - pub type PResult<'a, T> = Result<T, DiagnosticBuilder<'a>>; #[macro_use] diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 2532a1def7d..fd7c56f136f 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -65,8 +65,6 @@ use std::path::{Path, PathBuf}; use std::rc::Rc; use std::slice; -use rustc_i128::u128; - bitflags! { flags Restrictions: u8 { const RESTRICTION_STMT_EXPR = 1 << 0, diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs index e75671d27aa..ffdd3b2e93e 100644 --- a/src/libsyntax/print/pprust.rs +++ b/src/libsyntax/print/pprust.rs @@ -29,8 +29,6 @@ use std_inject; use symbol::{Symbol, keywords}; use tokenstream::{self, TokenTree}; -use rustc_i128::i128; - use std::ascii; use std::io::{self, Write, Read}; use std::iter; diff --git a/src/stage0.txt b/src/stage0.txt index 4be9e3e57ba..cda9a5a9643 100644 --- a/src/stage0.txt +++ b/src/stage0.txt @@ -12,5 +12,5 @@ # tarball for a stable release you'll likely see `1.x.0-$date` where `1.x.0` was # released on `$date` -rustc: beta-2016-12-20 +rustc: beta-2017-02-01 cargo: bfee18f73287687c543bda8c35e4e33808792715 |
