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.
This commit is contained in:
bors 2017-02-03 22:55:28 +00:00
commit 0648517faf
65 changed files with 111 additions and 494 deletions

View File

@ -54,7 +54,7 @@ TARGET_CRATES := libc std term \
compiler_builtins core alloc \ compiler_builtins core alloc \
std_unicode rustc_bitflags \ std_unicode rustc_bitflags \
alloc_system alloc_jemalloc \ 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_CRATES := rustc rustc_typeck rustc_mir rustc_borrowck rustc_resolve rustc_driver \
rustc_trans rustc_back rustc_llvm rustc_privacy rustc_lint \ rustc_trans rustc_back rustc_llvm rustc_privacy rustc_lint \
rustc_data_structures rustc_platform_intrinsics rustc_errors \ rustc_data_structures rustc_platform_intrinsics rustc_errors \
@ -92,25 +92,24 @@ DEPS_getopts := std
DEPS_graphviz := std DEPS_graphviz := std
DEPS_log := std DEPS_log := std
DEPS_num := std DEPS_num := std
DEPS_serialize := std log rustc_i128 DEPS_serialize := std log
DEPS_term := std DEPS_term := std
DEPS_test := std getopts term native:rust_test_helpers 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 \ 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_syntax_ext := syntax syntax_pos rustc_errors fmt_macros proc_macro
DEPS_proc_macro := syntax syntax_pos rustc_plugin log DEPS_proc_macro := syntax syntax_pos rustc_plugin log
DEPS_syntax_pos := serialize DEPS_syntax_pos := serialize
DEPS_proc_macro_plugin := syntax syntax_pos rustc_plugin 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 \ 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 \ DEPS_rustc := syntax fmt_macros flate arena serialize getopts \
log graphviz rustc_llvm rustc_back rustc_data_structures\ 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_back := std syntax flate log libc
DEPS_rustc_borrowck := rustc log graphviz syntax syntax_pos rustc_errors rustc_mir DEPS_rustc_borrowck := rustc log graphviz syntax syntax_pos rustc_errors rustc_mir
DEPS_rustc_data_structures := std log serialize libc 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_passes rustc_save_analysis rustc_const_eval \
rustc_incremental syntax_pos rustc_errors proc_macro rustc_data_structures rustc_incremental syntax_pos rustc_errors proc_macro rustc_data_structures
DEPS_rustc_errors := log libc serialize syntax_pos 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_rustc_llvm := native:rustllvm libc std rustc_bitflags
DEPS_proc_macro := std syntax DEPS_proc_macro := std syntax
DEPS_rustc_metadata := rustc syntax syntax_pos rustc_errors rustc_const_math \ 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_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 \ DEPS_rustc_mir := rustc syntax syntax_pos rustc_const_math rustc_const_eval rustc_bitflags
rustc_i128
DEPS_rustc_resolve := arena rustc log syntax syntax_pos rustc_errors DEPS_rustc_resolve := arena rustc log syntax syntax_pos rustc_errors
DEPS_rustc_platform_intrinsics := std DEPS_rustc_platform_intrinsics := std
DEPS_rustc_plugin := rustc rustc_metadata syntax syntax_pos rustc_errors DEPS_rustc_plugin := rustc rustc_metadata syntax syntax_pos rustc_errors
DEPS_rustc_privacy := rustc log syntax syntax_pos DEPS_rustc_privacy := rustc log syntax syntax_pos
DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back \ 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 rustc_const_math rustc_const_eval rustc_incremental rustc_errors syntax_pos
DEPS_rustc_incremental := rustc syntax_pos serialize rustc_data_structures DEPS_rustc_incremental := rustc syntax_pos serialize rustc_data_structures
DEPS_rustc_save_analysis := rustc log syntax syntax_pos serialize DEPS_rustc_save_analysis := rustc log syntax syntax_pos serialize
@ -162,7 +160,6 @@ ONLY_RLIB_alloc := 1
ONLY_RLIB_rand := 1 ONLY_RLIB_rand := 1
ONLY_RLIB_collections := 1 ONLY_RLIB_collections := 1
ONLY_RLIB_std_unicode := 1 ONLY_RLIB_std_unicode := 1
ONLY_RLIB_rustc_i128 := 1
ONLY_RLIB_rustc_bitflags := 1 ONLY_RLIB_rustc_bitflags := 1
ONLY_RLIB_alloc_system := 1 ONLY_RLIB_alloc_system := 1
ONLY_RLIB_alloc_jemalloc := 1 ONLY_RLIB_alloc_jemalloc := 1

View File

@ -13,7 +13,7 @@
###################################################################### ######################################################################
# The version number # 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' # 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 # NB Make sure it starts with a dot to conform to semver pre-release

16
src/Cargo.lock generated
View File

@ -248,7 +248,6 @@ dependencies = [
"rustc_const_math 0.0.0", "rustc_const_math 0.0.0",
"rustc_data_structures 0.0.0", "rustc_data_structures 0.0.0",
"rustc_errors 0.0.0", "rustc_errors 0.0.0",
"rustc_i128 0.0.0",
"rustc_llvm 0.0.0", "rustc_llvm 0.0.0",
"serialize 0.0.0", "serialize 0.0.0",
"syntax 0.0.0", "syntax 0.0.0",
@ -308,7 +307,6 @@ dependencies = [
"rustc_const_math 0.0.0", "rustc_const_math 0.0.0",
"rustc_data_structures 0.0.0", "rustc_data_structures 0.0.0",
"rustc_errors 0.0.0", "rustc_errors 0.0.0",
"rustc_i128 0.0.0",
"syntax 0.0.0", "syntax 0.0.0",
"syntax_pos 0.0.0", "syntax_pos 0.0.0",
] ]
@ -317,7 +315,6 @@ dependencies = [
name = "rustc_const_math" name = "rustc_const_math"
version = "0.0.0" version = "0.0.0"
dependencies = [ dependencies = [
"rustc_i128 0.0.0",
"serialize 0.0.0", "serialize 0.0.0",
"syntax 0.0.0", "syntax 0.0.0",
] ]
@ -327,7 +324,6 @@ name = "rustc_data_structures"
version = "0.0.0" version = "0.0.0"
dependencies = [ dependencies = [
"log 0.0.0", "log 0.0.0",
"rustc_i128 0.0.0",
"serialize 0.0.0", "serialize 0.0.0",
] ]
@ -370,10 +366,6 @@ dependencies = [
"syntax_pos 0.0.0", "syntax_pos 0.0.0",
] ]
[[package]]
name = "rustc_i128"
version = "0.0.0"
[[package]] [[package]]
name = "rustc_incremental" name = "rustc_incremental"
version = "0.0.0" version = "0.0.0"
@ -395,7 +387,6 @@ dependencies = [
"rustc 0.0.0", "rustc 0.0.0",
"rustc_back 0.0.0", "rustc_back 0.0.0",
"rustc_const_eval 0.0.0", "rustc_const_eval 0.0.0",
"rustc_i128 0.0.0",
"syntax 0.0.0", "syntax 0.0.0",
"syntax_pos 0.0.0", "syntax_pos 0.0.0",
] ]
@ -421,7 +412,6 @@ dependencies = [
"rustc_const_math 0.0.0", "rustc_const_math 0.0.0",
"rustc_data_structures 0.0.0", "rustc_data_structures 0.0.0",
"rustc_errors 0.0.0", "rustc_errors 0.0.0",
"rustc_i128 0.0.0",
"rustc_llvm 0.0.0", "rustc_llvm 0.0.0",
"serialize 0.0.0", "serialize 0.0.0",
"syntax 0.0.0", "syntax 0.0.0",
@ -440,7 +430,6 @@ dependencies = [
"rustc_const_eval 0.0.0", "rustc_const_eval 0.0.0",
"rustc_const_math 0.0.0", "rustc_const_math 0.0.0",
"rustc_data_structures 0.0.0", "rustc_data_structures 0.0.0",
"rustc_i128 0.0.0",
"syntax 0.0.0", "syntax 0.0.0",
"syntax_pos 0.0.0", "syntax_pos 0.0.0",
] ]
@ -519,7 +508,6 @@ dependencies = [
"rustc_const_math 0.0.0", "rustc_const_math 0.0.0",
"rustc_data_structures 0.0.0", "rustc_data_structures 0.0.0",
"rustc_errors 0.0.0", "rustc_errors 0.0.0",
"rustc_i128 0.0.0",
"rustc_incremental 0.0.0", "rustc_incremental 0.0.0",
"rustc_llvm 0.0.0", "rustc_llvm 0.0.0",
"rustc_platform_intrinsics 0.0.0", "rustc_platform_intrinsics 0.0.0",
@ -571,9 +559,6 @@ dependencies = [
[[package]] [[package]]
name = "serialize" name = "serialize"
version = "0.0.0" version = "0.0.0"
dependencies = [
"rustc_i128 0.0.0",
]
[[package]] [[package]]
name = "std" name = "std"
@ -618,7 +603,6 @@ dependencies = [
"rustc_bitflags 0.0.0", "rustc_bitflags 0.0.0",
"rustc_data_structures 0.0.0", "rustc_data_structures 0.0.0",
"rustc_errors 0.0.0", "rustc_errors 0.0.0",
"rustc_i128 0.0.0",
"serialize 0.0.0", "serialize 0.0.0",
"syntax_pos 0.0.0", "syntax_pos 0.0.0",
] ]

View File

@ -293,7 +293,6 @@ impl<T: ?Sized> Box<T> {
} }
} }
#[cfg(not(stage0))]
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
unsafe impl<#[may_dangle] T: ?Sized> Drop for Box<T> { unsafe impl<#[may_dangle] T: ?Sized> Drop for Box<T> {
fn drop(&mut self) { fn drop(&mut self) {

View File

@ -143,14 +143,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))] #[cfg(not(test))]
#[lang = "box_free"] #[lang = "box_free"]
#[inline] #[inline]

View File

@ -20,7 +20,6 @@
#![feature(staged_api, core_intrinsics, repr_simd, #![feature(staged_api, core_intrinsics, repr_simd,
i128_type, core_float, abi_unadjusted, associated_consts)] i128_type, core_float, abi_unadjusted, associated_consts)]
#![allow(non_camel_case_types, unused_variables, unused_imports)] #![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", #[cfg(any(target_pointer_width="32", target_pointer_width="16", target_os="windows",
target_arch="mips64"))] target_arch="mips64"))]
@ -32,17 +31,6 @@ pub mod reimpls {
use core::intrinsics::unchecked_rem; use core::intrinsics::unchecked_rem;
use core::ptr; 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 { macro_rules! ashl {
($a:expr, $b:expr, $ty:ty) => {{ ($a:expr, $b:expr, $ty:ty) => {{
let (a, b) = ($a, $b); let (a, b) = ($a, $b);
@ -63,8 +51,8 @@ pub mod reimpls {
} }
#[export_name="__ashlti3"] #[export_name="__ashlti3"]
pub extern "C" fn shl(a: u128_, b: u128_) -> u128_ { pub extern "C" fn shl(a: u128, b: u128) -> u128 {
ashl!(a, b, u128_) ashl!(a, b, u128)
} }
macro_rules! ashr { macro_rules! ashr {
@ -88,8 +76,8 @@ pub mod reimpls {
} }
#[export_name="__ashrti3"] #[export_name="__ashrti3"]
pub extern "C" fn shr(a: i128_, b: i128_) -> i128_ { pub extern "C" fn shr(a: i128, b: i128) -> i128 {
ashr!(a, b, i128_) ashr!(a, b, i128)
} }
macro_rules! lshr { macro_rules! lshr {
@ -111,22 +99,11 @@ pub mod reimpls {
#[export_name="__lshrti3"] #[export_name="__lshrti3"]
pub extern "C" fn lshr(a: u128_, b: u128_) -> u128_ { pub extern "C" fn lshr(a: u128, b: u128) -> u128 {
lshr!(a, b, u128_) lshr!(a, b, u128)
} }
#[cfg(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_ {
unsafe {
if !rem.is_null() {
*rem = unchecked_rem(n, d);
}
unchecked_div(n, d)
}
}
#[cfg(not(stage0))]
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 // Translated from Figure 3-40 of The PowerPC Compiler Writer's Guide
unsafe { unsafe {
// special cases, X is unknown, K != 0 // 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 b = b.uabs();
let sa = a.signum(); let sa = a.signum();
let a = a.uabs(); let a = a.uabs();
unsafe { unsafe {
let mut r = ::core::mem::zeroed(); let mut r = ::core::mem::zeroed();
u128_div_mod(a, b, &mut r); 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 sa = a.signum();
let sb = b.signum(); let sb = b.signum();
let a = a.uabs(); let a = a.uabs();
let b = b.uabs(); let b = b.uabs();
let sr = sa.wrapping_mul(sb); // sign of quotient let sr = sa.wrapping_mul(sb); // sign of quotient
(if sr == -1 { (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 { } 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 { macro_rules! mulo {
($a:expr, $b:expr, $o: expr, $ty: ty) => {{ ($a:expr, $b:expr, $o: expr, $ty: ty) => {{
let (a, b, overflow) = ($a, $b, $o); let (a, b, overflow) = ($a, $b, $o);
@ -367,35 +338,6 @@ pub mod reimpls {
fn high(self) -> Self::HighHalf; fn high(self) -> Self::HighHalf;
fn from_parts(low: Self::LowHalf, high: Self::HighHalf) -> Self; 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 { impl LargeInt for u128 {
type LowHalf = u64; type LowHalf = u64;
type HighHalf = u64; type HighHalf = u64;
@ -410,7 +352,6 @@ pub mod reimpls {
(high as u128).wrapping_shl(64) | low as u128 (high as u128).wrapping_shl(64) | low as u128
} }
} }
#[cfg(not(stage0))]
impl LargeInt for i128 { impl LargeInt for i128 {
type LowHalf = u64; type LowHalf = u64;
type HighHalf = i64; type HighHalf = i64;
@ -455,47 +396,31 @@ pub mod reimpls {
}} }}
} }
#[cfg(stage0)]
#[export_name="__multi3"] #[export_name="__multi3"]
pub extern "C" fn u128_mul(a: i128_, b: i128_) -> i128_ { pub extern "C" fn u128_mul(a: i128, b: i128) -> i128 {
((a as i64).wrapping_mul(b as i64) as i128_) mul!(a, b, i128, i64)
}
#[cfg(not(stage0))]
#[export_name="__multi3"]
pub extern "C" fn u128_mul(a: i128_, b: i128_) -> i128_ {
mul!(a, b, i128_, i64)
} }
trait AbsExt: Sized { trait AbsExt: Sized {
fn uabs(self) -> u128_ { fn uabs(self) -> u128 {
self.iabs() as u128_ self.iabs() as u128
} }
fn iabs(self) -> i128_; fn iabs(self) -> i128;
} }
#[cfg(stage0)] impl AbsExt for i128 {
impl AbsExt for i128_ { fn iabs(self) -> i128 {
fn iabs(self) -> i128_ {
let s = self >> 63;
((self ^ s).wrapping_sub(s))
}
}
#[cfg(not(stage0))]
impl AbsExt for i128_ {
fn iabs(self) -> i128_ {
let s = self >> 127; let s = self >> 127;
((self ^ s).wrapping_sub(s)) ((self ^ s).wrapping_sub(s))
} }
} }
trait NegExt: Sized { trait NegExt: Sized {
fn unchecked_neg(self) -> i128_; fn unchecked_neg(self) -> i128;
} }
impl NegExt for i128_ { impl NegExt for i128 {
fn unchecked_neg(self) -> i128_ { fn unchecked_neg(self) -> i128 {
(!self).wrapping_add(1) (!self).wrapping_add(1)
} }
} }
@ -551,9 +476,9 @@ pub mod reimpls {
let exponent = $from.get_exponent(); let exponent = $from.get_exponent();
let mantissa_fraction = repr & <$fromty as FloatStuff>::MANTISSA_MASK; let mantissa_fraction = repr & <$fromty as FloatStuff>::MANTISSA_MASK;
let mantissa = mantissa_fraction | <$fromty as FloatStuff>::MANTISSA_LEAD_BIT; 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 { 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 { (if exponent < (<$fromty as FloatStuff>::MANTISSA_BITS) as i32 {
(mantissa as $outty) (mantissa as $outty)
@ -576,7 +501,7 @@ pub mod reimpls {
let mantissa_fraction = repr & <$fromty as FloatStuff>::MANTISSA_MASK; let mantissa_fraction = repr & <$fromty as FloatStuff>::MANTISSA_MASK;
let mantissa = mantissa_fraction | <$fromty as FloatStuff>::MANTISSA_LEAD_BIT; 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 { if exponent > ::core::mem::size_of::<$outty>() as i32 * 8 {
let ret = if sign > 0.0 { <$outty>::max_value() } else { <$outty>::min_value() }; let ret = if sign > 0.0 { <$outty>::max_value() } else { <$outty>::min_value() };
return ret 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() { match a.signum() {
1 => u128_as_f64(a.uabs()), 1 => u128_as_f64(a.uabs()),
0 => 0.0, 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() { match a.signum() {
1 => u128_as_f32(a.uabs()), 1 => u128_as_f32(a.uabs()),
0 => 0.0, 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; use ::core::f64::MANTISSA_DIGITS;
if a == 0 { return 0.0; } if a == 0 { return 0.0; }
let sd = 128u32.wrapping_sub(a.leading_zeros()); let sd = 128u32.wrapping_sub(a.leading_zeros());
@ -620,7 +545,7 @@ pub mod reimpls {
const MD2 : u32 = MANTISSA_DIGITS + 2; const MD2 : u32 = MANTISSA_DIGITS + 2;
// SNAP: replace this with !0u128 // SNAP: replace this with !0u128
let negn :u128_ = !0; let negn :u128 = !0;
if sd > MANTISSA_DIGITS { if sd > MANTISSA_DIGITS {
a = match sd { a = match sd {
@ -628,7 +553,7 @@ pub mod reimpls {
MD2 => a, MD2 => a,
_ => a.wrapping_shr(sd.wrapping_sub(MANTISSA_DIGITS + 2)) | _ => a.wrapping_shr(sd.wrapping_sub(MANTISSA_DIGITS + 2)) |
(if (a & (negn.wrapping_shr(128 + 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 |= if (a & 4) == 0 { 0 } else { 1 };
a = a.wrapping_add(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; use ::core::f32::MANTISSA_DIGITS;
if a == 0 { return 0.0; } if a == 0 { return 0.0; }
let sd = 128u32.wrapping_sub(a.leading_zeros()); let sd = 128u32.wrapping_sub(a.leading_zeros());
@ -655,7 +580,7 @@ pub mod reimpls {
const MD2 : u32 = MANTISSA_DIGITS + 2; const MD2 : u32 = MANTISSA_DIGITS + 2;
// SNAP: replace this with !0u128 // SNAP: replace this with !0u128
let negn :u128_ = !0; let negn :u128 = !0;
if sd > MANTISSA_DIGITS { if sd > MANTISSA_DIGITS {
a = match sd { a = match sd {
@ -663,7 +588,7 @@ pub mod reimpls {
MD2 => a, MD2 => a,
_ => a.wrapping_shr(sd.wrapping_sub(MANTISSA_DIGITS + 2)) | _ => a.wrapping_shr(sd.wrapping_sub(MANTISSA_DIGITS + 2)) |
(if (a & (negn.wrapping_shr(128 + 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 |= if (a & 4) == 0 { 0 } else { 1 };
a = a.wrapping_add(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) => { macro_rules! why_are_abi_strings_checked_by_parser { ($cret:ty, $conv:expr, $unadj:tt) => {
mod imp { 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, use super::{i128_as_f64, i128_as_f32, u128_as_f64, u128_as_f32,
i128_div, i128_mod, u128_div_mod, unchecked_div, ptr}; i128_div, i128_mod, u128_div_mod, unchecked_div, ptr};
// For x64 // For x64
@ -692,8 +617,8 @@ pub mod reimpls {
// aka. // aka.
// define i128 @__muloti4(i128, i128, i32*) // define i128 @__muloti4(i128, i128, i32*)
#[export_name="__muloti4"] #[export_name="__muloti4"]
pub unsafe extern $unadj fn i128_mul_oflow(a: i128_, b: i128_, o: *mut i32) -> i128_ { pub unsafe extern $unadj fn i128_mul_oflow(a: i128, b: i128, o: *mut i32) -> i128 {
mulo!(a, b, o, i128_) mulo!(a, b, o, i128)
} }
// For x64 // For x64
@ -701,19 +626,19 @@ pub mod reimpls {
// aka. // aka.
// define double @__muloti4(i128) // define double @__muloti4(i128)
#[export_name="__floattidf"] #[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) i128_as_f64(a)
} }
#[export_name="__floattisf"] #[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) i128_as_f32(a)
} }
#[export_name="__floatuntidf"] #[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) u128_as_f64(a)
} }
#[export_name="__floatuntisf"] #[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) u128_as_f32(a)
} }
@ -722,23 +647,23 @@ pub mod reimpls {
// aka. // aka.
// define i128 @stuff(double) // define i128 @stuff(double)
#[export_name="__fixunsdfti"] #[export_name="__fixunsdfti"]
pub extern $unadj fn f64_as_u128(a: f64) -> u128_ { pub extern $unadj fn f64_as_u128(a: f64) -> u128 {
float_as_unsigned!(a, f64, u128_) float_as_unsigned!(a, f64, u128)
} }
#[export_name="__fixunssfti"] #[export_name="__fixunssfti"]
pub extern "unadjusted" fn f32_as_u128(a: f32) -> u128_ { pub extern "unadjusted" fn f32_as_u128(a: f32) -> u128 {
float_as_unsigned!(a, f32, u128_) float_as_unsigned!(a, f32, u128)
} }
#[export_name="__fixdfti"] #[export_name="__fixdfti"]
pub extern "unadjusted" fn f64_as_i128(a: f64) -> i128_ { pub extern "unadjusted" fn f64_as_i128(a: f64) -> i128 {
float_as_signed!(a, f64, i128_) float_as_signed!(a, f64, i128)
} }
#[export_name="__fixsfti"] #[export_name="__fixsfti"]
pub extern "unadjusted" fn f32_as_i128(a: f32) -> i128_ { pub extern "unadjusted" fn f32_as_i128(a: f32) -> i128 {
float_as_signed!(a, f32, i128_) float_as_signed!(a, f32, i128)
} }
#[repr(simd)] #[repr(simd)]
@ -751,19 +676,19 @@ pub mod reimpls {
// //
// That almost matches the C ABI, so we simply use the C ABI // That almost matches the C ABI, so we simply use the C ABI
#[export_name="__udivmodti4"] #[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); let x = u128_div_mod(n, d, rem);
($conv)(x) ($conv)(x)
} }
#[export_name="__udivti3"] #[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()); let x = u128_div_mod(a, b, ptr::null_mut());
($conv)(x) ($conv)(x)
} }
#[export_name="__umodti3"] #[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 { unsafe {
let mut r = ::core::mem::zeroed(); let mut r = ::core::mem::zeroed();
u128_div_mod(a, b, &mut r); u128_div_mod(a, b, &mut r);
@ -772,30 +697,26 @@ pub mod reimpls {
} }
#[export_name="__divti3"] #[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); let x = i128_div(a, b);
($conv)(x as u128_) ($conv)(x as u128)
} }
#[export_name="__modti3"] #[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); let x = i128_mod(a, b);
($conv)(x as u128_) ($conv)(x as u128)
} }
} }
} } } }
// LLVM expectations for ABI on windows x64 are pure madness. // LLVM expectations for ABI on windows x64 are pure madness.
#[cfg(not(stage0))]
#[cfg(all(windows, target_pointer_width="64"))] #[cfg(all(windows, target_pointer_width="64"))]
why_are_abi_strings_checked_by_parser!(u64x2, why_are_abi_strings_checked_by_parser!(u64x2,
|i: u128_| u64x2(i.low(), i.high()), |i: u128| u64x2(i.low(), i.high()),
"unadjusted"); "unadjusted");
#[cfg(not(stage0))]
#[cfg(not(all(windows, target_pointer_width="64")))] #[cfg(not(all(windows, target_pointer_width="64")))]
why_are_abi_strings_checked_by_parser!(u128_, |i|{ i }, "C"); why_are_abi_strings_checked_by_parser!(u128, |i|{ i }, "C");
#[cfg(not(stage0))]
pub use self::imp::*; pub use self::imp::*;
} }

View File

@ -153,7 +153,6 @@ clone_impl! { i8 }
clone_impl! { i16 } clone_impl! { i16 }
clone_impl! { i32 } clone_impl! { i32 }
clone_impl! { i64 } clone_impl! { i64 }
#[cfg(not(stage0))]
clone_impl! { i128 } clone_impl! { i128 }
clone_impl! { usize } clone_impl! { usize }
@ -161,7 +160,6 @@ clone_impl! { u8 }
clone_impl! { u16 } clone_impl! { u16 }
clone_impl! { u32 } clone_impl! { u32 }
clone_impl! { u64 } clone_impl! { u64 }
#[cfg(not(stage0))]
clone_impl! { u128 } clone_impl! { u128 }
clone_impl! { f32 } clone_impl! { f32 }

View File

@ -679,10 +679,8 @@ mod impls {
} }
partial_eq_impl! { 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 { macro_rules! eq_impl {
($($t:ty)*) => ($( ($($t:ty)*) => ($(
@ -691,9 +689,7 @@ mod impls {
)*) )*)
} }
eq_impl! { () bool char usize u8 u16 u32 u64 isize i8 i16 i32 i64 } eq_impl! { () bool char usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
#[cfg(not(stage0))]
eq_impl! { u128 i128 }
macro_rules! partial_ord_impl { macro_rules! partial_ord_impl {
($($t:ty)*) => ($( ($($t:ty)*) => ($(
@ -782,9 +778,7 @@ mod impls {
} }
} }
ord_impl! { char usize u8 u16 u32 u64 isize i8 i16 i32 i64 } ord_impl! { char usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
#[cfg(not(stage0))]
ord_impl! { u128 i128 }
#[unstable(feature = "never_type_impls", issue = "35121")] #[unstable(feature = "never_type_impls", issue = "35121")]
impl PartialEq for ! { impl PartialEq for ! {

View File

@ -144,7 +144,6 @@ default_impl! { u8, 0 }
default_impl! { u16, 0 } default_impl! { u16, 0 }
default_impl! { u32, 0 } default_impl! { u32, 0 }
default_impl! { u64, 0 } default_impl! { u64, 0 }
#[cfg(not(stage0))]
default_impl! { u128, 0 } default_impl! { u128, 0 }
default_impl! { isize, 0 } default_impl! { isize, 0 }
@ -152,7 +151,6 @@ default_impl! { i8, 0 }
default_impl! { i16, 0 } default_impl! { i16, 0 }
default_impl! { i32, 0 } default_impl! { i32, 0 }
default_impl! { i64, 0 } default_impl! { i64, 0 }
#[cfg(not(stage0))]
default_impl! { i128, 0 } default_impl! { i128, 0 }
default_impl! { f32, 0.0f32 } default_impl! { f32, 0.0f32 }

View File

@ -30,7 +30,6 @@ trait Int: Zero + PartialEq + PartialOrd + Div<Output=Self> + Rem<Output=Self> +
fn to_u16(&self) -> u16; fn to_u16(&self) -> u16;
fn to_u32(&self) -> u32; fn to_u32(&self) -> u32;
fn to_u64(&self) -> u64; fn to_u64(&self) -> u64;
#[cfg(not(stage0))]
fn to_u128(&self) -> u128; fn to_u128(&self) -> u128;
} }
@ -41,13 +40,10 @@ macro_rules! doit {
fn to_u16(&self) -> u16 { *self as u16 } fn to_u16(&self) -> u16 { *self as u16 }
fn to_u32(&self) -> u32 { *self as u32 } fn to_u32(&self) -> u32 { *self as u32 }
fn to_u64(&self) -> u64 { *self as u64 } fn to_u64(&self) -> u64 { *self as u64 }
#[cfg(not(stage0))]
fn to_u128(&self) -> u128 { *self as u128 } fn to_u128(&self) -> u128 { *self as u128 }
})*) })*)
} }
doit! { i8 i16 i32 i64 isize u8 u16 u32 u64 usize } doit! { i8 i16 i32 i64 i128 isize u8 u16 u32 u64 u128 usize }
#[cfg(not(stage0))]
doit! { i128 u128 }
/// A type that represents a specific radix /// A type that represents a specific radix
#[doc(hidden)] #[doc(hidden)]
@ -188,7 +184,6 @@ integer! { i8, u8 }
integer! { i16, u16 } integer! { i16, u16 }
integer! { i32, u32 } integer! { i32, u32 }
integer! { i64, u64 } integer! { i64, u64 }
#[cfg(not(stage0))]
integer! { i128, u128 } integer! { i128, u128 }
const DEC_DIGITS_LUT: &'static[u8] = 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!(i8, u8, i16, u16, i32, u32: to_u32);
impl_Display!(i64, u64: to_u64); impl_Display!(i64, u64: to_u64);
#[cfg(not(stage0))]
impl_Display!(i128, u128: to_u128); impl_Display!(i128, u128: to_u128);
#[cfg(target_pointer_width = "16")] #[cfg(target_pointer_width = "16")]
impl_Display!(isize, usize: to_u16); impl_Display!(isize, usize: to_u16);

View File

@ -186,7 +186,6 @@ pub trait Hasher {
fn write_u64(&mut self, i: u64) { fn write_u64(&mut self, i: u64) {
self.write(&unsafe { mem::transmute::<_, [u8; 8]>(i) }) self.write(&unsafe { mem::transmute::<_, [u8; 8]>(i) })
} }
#[cfg(not(stage0))]
/// Writes a single `u128` into this hasher. /// Writes a single `u128` into this hasher.
#[inline] #[inline]
#[unstable(feature = "i128", issue = "35118")] #[unstable(feature = "i128", issue = "35118")]
@ -227,7 +226,6 @@ pub trait Hasher {
fn write_i64(&mut self, i: i64) { fn write_i64(&mut self, i: i64) {
self.write_u64(i as u64) self.write_u64(i as u64)
} }
#[cfg(not(stage0))]
/// Writes a single `i128` into this hasher. /// Writes a single `i128` into this hasher.
#[inline] #[inline]
#[unstable(feature = "i128", issue = "35118")] #[unstable(feature = "i128", issue = "35118")]
@ -376,9 +374,6 @@ mod impls {
(i32, write_i32), (i32, write_i32),
(i64, write_i64), (i64, write_i64),
(isize, write_isize), (isize, write_isize),
}
#[cfg(not(stage0))]
impl_write! {
(u128, write_u128), (u128, write_u128),
(i128, write_i128), (i128, write_i128),
} }

View File

@ -242,7 +242,6 @@ step_impl_signed!(i64);
// assume here that it is less than 64-bits. // assume here that it is less than 64-bits.
#[cfg(not(target_pointer_width = "64"))] #[cfg(not(target_pointer_width = "64"))]
step_impl_no_between!(u64 i64); step_impl_no_between!(u64 i64);
#[cfg(not(stage0))]
step_impl_no_between!(u128 i128); step_impl_no_between!(u128 i128);
/// An adapter for stepping range iterators by a custom amount. /// An adapter for stepping range iterators by a custom amount.

View File

@ -89,7 +89,7 @@
#![feature(staged_api)] #![feature(staged_api)]
#![feature(unboxed_closures)] #![feature(unboxed_closures)]
#![feature(never_type)] #![feature(never_type)]
#![cfg_attr(not(stage0), feature(i128_type))] #![feature(i128_type)]
#![feature(prelude_import)] #![feature(prelude_import)]
#[prelude_import] #[prelude_import]
@ -119,9 +119,6 @@ mod uint_macros;
#[path = "num/i16.rs"] pub mod i16; #[path = "num/i16.rs"] pub mod i16;
#[path = "num/i32.rs"] pub mod i32; #[path = "num/i32.rs"] pub mod i32;
#[path = "num/i64.rs"] pub mod i64; #[path = "num/i64.rs"] pub mod i64;
// SNAP
#[cfg(not(stage0))]
#[path = "num/i128.rs"] pub mod i128; #[path = "num/i128.rs"] pub mod i128;
#[path = "num/usize.rs"] pub mod usize; #[path = "num/usize.rs"] pub mod usize;
@ -129,9 +126,6 @@ mod uint_macros;
#[path = "num/u16.rs"] pub mod u16; #[path = "num/u16.rs"] pub mod u16;
#[path = "num/u32.rs"] pub mod u32; #[path = "num/u32.rs"] pub mod u32;
#[path = "num/u64.rs"] pub mod u64; #[path = "num/u64.rs"] pub mod u64;
// SNAP
#[cfg(not(stage0))]
#[path = "num/u128.rs"] pub mod u128; #[path = "num/u128.rs"] pub mod u128;
#[path = "num/f32.rs"] pub mod f32; #[path = "num/f32.rs"] pub mod f32;

View File

@ -30,9 +30,7 @@ unsafe impl Zeroable for i32 {}
unsafe impl Zeroable for u32 {} unsafe impl Zeroable for u32 {}
unsafe impl Zeroable for i64 {} unsafe impl Zeroable for i64 {}
unsafe impl Zeroable for u64 {} unsafe impl Zeroable for u64 {}
#[cfg(not(stage0))]
unsafe impl Zeroable for i128 {} unsafe impl Zeroable for i128 {}
#[cfg(not(stage0))]
unsafe impl Zeroable for u128 {} unsafe impl Zeroable for u128 {}
/// A wrapper type for raw pointers and integers that will never be /// A wrapper type for raw pointers and integers that will never be

View File

@ -144,9 +144,7 @@ macro_rules! zero_one_impl {
} }
)*) )*)
} }
zero_one_impl! { u8 u16 u32 u64 usize i8 i16 i32 i64 isize } zero_one_impl! { u8 u16 u32 u64 u128 usize i8 i16 i32 i64 i128 isize }
#[cfg(not(stage0))]
zero_one_impl! { u128 i128 }
macro_rules! zero_one_impl_float { macro_rules! zero_one_impl_float {
($($t:ty)*) => ($( ($($t:ty)*) => ($(
@ -1300,8 +1298,6 @@ impl i64 {
intrinsics::mul_with_overflow } intrinsics::mul_with_overflow }
} }
// SNAP
#[cfg(not(stage0))]
#[lang = "i128"] #[lang = "i128"]
impl i128 { impl i128 {
int_impl! { i128, u128, 128, int_impl! { i128, u128, 128,
@ -2342,8 +2338,6 @@ impl u64 {
intrinsics::mul_with_overflow } intrinsics::mul_with_overflow }
} }
// SNAP
#[cfg(not(stage0))]
#[lang = "u128"] #[lang = "u128"]
impl u128 { impl u128 {
uint_impl! { u128, 128, 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 } from_str_radix_int_impl! { isize i8 i16 i32 i64 i128 usize u8 u16 u32 u64 u128 }
#[cfg(not(stage0))]
from_str_radix_int_impl! { u128 i128 }
/// The error type returned when a checked integral type conversion fails. /// The error type returned when a checked integral type conversion fails.
#[unstable(feature = "try_from", issue = "33417")] #[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); 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); 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); 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); 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); 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); 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); 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); 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); 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); 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); 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); same_sign_try_from_int_impl!(i128, isize, i8, i16, i32, i64, i128, isize);
macro_rules! cross_sign_from_int_impl { 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); 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); 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); 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); 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); 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); cross_sign_from_int_impl!(usize, i8, i16, i32, i64, i128, isize);
#[doc(hidden)] #[doc(hidden)]
@ -2742,9 +2684,7 @@ macro_rules! doit {
} }
})*) })*)
} }
doit! { i8 i16 i32 i64 isize u8 u16 u32 u64 usize } doit! { i8 i16 i32 i64 i128 isize u8 u16 u32 u64 u128 usize }
#[cfg(not(stage0))]
doit! { i128 u128 }
fn from_str_radix<T: FromStrRadixHelper>(src: &str, radix: u32) -> Result<T, ParseIntError> { fn from_str_radix<T: FromStrRadixHelper>(src: &str, radix: u32) -> Result<T, ParseIntError> {
use self::IntErrorKind::*; use self::IntErrorKind::*;
@ -2878,50 +2818,38 @@ macro_rules! impl_from {
impl_from! { u8, u16 } impl_from! { u8, u16 }
impl_from! { u8, u32 } impl_from! { u8, u32 }
impl_from! { u8, u64 } impl_from! { u8, u64 }
#[cfg(not(stage0))]
impl_from! { u8, u128 } impl_from! { u8, u128 }
impl_from! { u8, usize } impl_from! { u8, usize }
impl_from! { u16, u32 } impl_from! { u16, u32 }
impl_from! { u16, u64 } impl_from! { u16, u64 }
#[cfg(not(stage0))]
impl_from! { u16, u128 } impl_from! { u16, u128 }
impl_from! { u32, u64 } impl_from! { u32, u64 }
#[cfg(not(stage0))]
impl_from! { u32, u128 } impl_from! { u32, u128 }
#[cfg(not(stage0))]
impl_from! { u64, u128 } impl_from! { u64, u128 }
// Signed -> Signed // Signed -> Signed
impl_from! { i8, i16 } impl_from! { i8, i16 }
impl_from! { i8, i32 } impl_from! { i8, i32 }
impl_from! { i8, i64 } impl_from! { i8, i64 }
#[cfg(not(stage0))]
impl_from! { i8, i128 } impl_from! { i8, i128 }
impl_from! { i8, isize } impl_from! { i8, isize }
impl_from! { i16, i32 } impl_from! { i16, i32 }
impl_from! { i16, i64 } impl_from! { i16, i64 }
#[cfg(not(stage0))]
impl_from! { i16, i128 } impl_from! { i16, i128 }
impl_from! { i32, i64 } impl_from! { i32, i64 }
#[cfg(not(stage0))]
impl_from! { i32, i128 } impl_from! { i32, i128 }
#[cfg(not(stage0))]
impl_from! { i64, i128 } impl_from! { i64, i128 }
// Unsigned -> Signed // Unsigned -> Signed
impl_from! { u8, i16 } impl_from! { u8, i16 }
impl_from! { u8, i32 } impl_from! { u8, i32 }
impl_from! { u8, i64 } impl_from! { u8, i64 }
#[cfg(not(stage0))]
impl_from! { u8, i128 } impl_from! { u8, i128 }
impl_from! { u16, i32 } impl_from! { u16, i32 }
impl_from! { u16, i64 } impl_from! { u16, i64 }
#[cfg(not(stage0))]
impl_from! { u16, i128 } impl_from! { u16, i128 }
impl_from! { u32, i64 } impl_from! { u32, i64 }
#[cfg(not(stage0))]
impl_from! { u32, i128 } impl_from! { u32, i128 }
#[cfg(not(stage0))]
impl_from! { u64, i128 } impl_from! { u64, i128 }
// Note: integers can only be represented with full precision in a float if // Note: integers can only be represented with full precision in a float if

View File

@ -297,9 +297,7 @@ macro_rules! wrapping_impl {
)*) )*)
} }
wrapping_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 } wrapping_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
#[cfg(not(stage0))]
wrapping_impl! { u128 i128 }
mod shift_max { mod shift_max {
#![allow(non_upper_case_globals)] #![allow(non_upper_case_globals)]

View File

@ -267,9 +267,7 @@ macro_rules! add_impl {
)*) )*)
} }
add_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 } add_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
#[cfg(not(stage0))]
add_impl! { u128 i128 }
/// The `Sub` trait is used to specify the functionality of `-`. /// 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 } sub_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
#[cfg(not(stage0))]
sub_impl! { u128 i128 }
/// The `Mul` trait is used to specify the functionality of `*`. /// 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 } mul_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
#[cfg(not(stage0))]
mul_impl! { u128 i128 }
/// The `Div` trait is used to specify the functionality of `/`. /// 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 } div_impl_integer! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
#[cfg(not(stage0))]
div_impl_integer! { u128 i128 }
macro_rules! div_impl_float { macro_rules! div_impl_float {
($($t:ty)*) => ($( ($($t:ty)*) => ($(
@ -678,9 +670,7 @@ macro_rules! rem_impl_integer {
)*) )*)
} }
rem_impl_integer! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 } rem_impl_integer! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
#[cfg(not(stage0))]
rem_impl_integer! { u128 i128 }
macro_rules! rem_impl_float { macro_rules! rem_impl_float {
@ -776,9 +766,7 @@ macro_rules! neg_impl_unsigned {
} }
// neg_impl_unsigned! { usize u8 u16 u32 u64 } // neg_impl_unsigned! { usize u8 u16 u32 u64 }
neg_impl_numeric! { isize i8 i16 i32 i64 f32 f64 } neg_impl_numeric! { isize i8 i16 i32 i64 i128 f32 f64 }
#[cfg(not(stage0))]
neg_impl_numeric! { i128 }
/// The `Not` trait is used to specify the functionality of unary `!`. /// 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 } not_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
#[cfg(not(stage0))]
not_impl! { u128 i128 }
/// The `BitAnd` trait is used to specify the functionality of `&`. /// 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 } bitand_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
#[cfg(not(stage0))]
bitand_impl! { u128 i128 }
/// The `BitOr` trait is used to specify the functionality of `|`. /// 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 } bitor_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
#[cfg(not(stage0))]
bitor_impl! { u128 i128 }
/// The `BitXor` trait is used to specify the functionality of `^`. /// 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 } bitxor_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
#[cfg(not(stage0))]
bitxor_impl! { u128 i128 }
/// The `Shl` trait is used to specify the functionality of `<<`. /// 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, u16 }
shl_impl! { $t, u32 } shl_impl! { $t, u32 }
shl_impl! { $t, u64 } shl_impl! { $t, u64 }
#[cfg(not(stage0))]
shl_impl! { $t, u128 } shl_impl! { $t, u128 }
shl_impl! { $t, usize } shl_impl! { $t, usize }
@ -1195,15 +1174,12 @@ macro_rules! shl_impl_all {
shl_impl! { $t, i16 } shl_impl! { $t, i16 }
shl_impl! { $t, i32 } shl_impl! { $t, i32 }
shl_impl! { $t, i64 } shl_impl! { $t, i64 }
#[cfg(not(stage0))]
shl_impl! { $t, i128 } shl_impl! { $t, i128 }
shl_impl! { $t, isize } shl_impl! { $t, isize }
)*) )*)
} }
shl_impl_all! { u8 u16 u32 u64 usize i8 i16 i32 i64 isize } shl_impl_all! { u8 u16 u32 u64 u128 usize i8 i16 i32 i64 isize i128 }
#[cfg(not(stage0))]
shl_impl_all! { u128 i128 }
/// The `Shr` trait is used to specify the functionality of `>>`. /// 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, u16 }
shr_impl! { $t, u32 } shr_impl! { $t, u32 }
shr_impl! { $t, u64 } shr_impl! { $t, u64 }
#[cfg(not(stage0))]
shr_impl! { $t, u128 } shr_impl! { $t, u128 }
shr_impl! { $t, usize } shr_impl! { $t, usize }
@ -1302,15 +1277,12 @@ macro_rules! shr_impl_all {
shr_impl! { $t, i16 } shr_impl! { $t, i16 }
shr_impl! { $t, i32 } shr_impl! { $t, i32 }
shr_impl! { $t, i64 } shr_impl! { $t, i64 }
#[cfg(not(stage0))]
shr_impl! { $t, i128 } shr_impl! { $t, i128 }
shr_impl! { $t, isize } shr_impl! { $t, isize }
)*) )*)
} }
shr_impl_all! { u8 u16 u32 u64 usize i8 i16 i32 i64 isize } shr_impl_all! { u8 u16 u32 u64 u128 usize i8 i16 i32 i64 i128 isize }
#[cfg(not(stage0))]
shr_impl_all! { u128 i128 }
/// The `AddAssign` trait is used to specify the functionality of `+=`. /// 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 } add_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
#[cfg(not(stage0))]
add_assign_impl! { u128 i128 }
/// The `SubAssign` trait is used to specify the functionality of `-=`. /// 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 } sub_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
#[cfg(not(stage0))]
sub_assign_impl! { u128 i128 }
/// The `MulAssign` trait is used to specify the functionality of `*=`. /// 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 } mul_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
#[cfg(not(stage0))]
mul_assign_impl! { u128 i128 }
/// The `DivAssign` trait is used to specify the functionality of `/=`. /// 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 } div_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
#[cfg(not(stage0))]
div_assign_impl! { u128 i128 }
/// The `RemAssign` trait is used to specify the functionality of `%=`. /// 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 } rem_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
#[cfg(not(stage0))]
rem_assign_impl! { u128 i128 }
/// The `BitAndAssign` trait is used to specify the functionality of `&=`. /// 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 } bitand_assign_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
#[cfg(not(stage0))]
bitand_assign_impl! { u128 i128 }
/// The `BitOrAssign` trait is used to specify the functionality of `|=`. /// 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 } bitor_assign_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
#[cfg(not(stage0))]
bitor_assign_impl! { u128 i128 }
/// The `BitXorAssign` trait is used to specify the functionality of `^=`. /// 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 } bitxor_assign_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }
#[cfg(not(stage0))]
bitxor_assign_impl! { u128 i128 }
/// The `ShlAssign` trait is used to specify the functionality of `<<=`. /// 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, u16 }
shl_assign_impl! { $t, u32 } shl_assign_impl! { $t, u32 }
shl_assign_impl! { $t, u64 } shl_assign_impl! { $t, u64 }
#[cfg(not(stage0))]
shl_assign_impl! { $t, u128 } shl_assign_impl! { $t, u128 }
shl_assign_impl! { $t, usize } shl_assign_impl! { $t, usize }
@ -1806,15 +1761,12 @@ macro_rules! shl_assign_impl_all {
shl_assign_impl! { $t, i16 } shl_assign_impl! { $t, i16 }
shl_assign_impl! { $t, i32 } shl_assign_impl! { $t, i32 }
shl_assign_impl! { $t, i64 } shl_assign_impl! { $t, i64 }
#[cfg(not(stage0))]
shl_assign_impl! { $t, i128 } shl_assign_impl! { $t, i128 }
shl_assign_impl! { $t, isize } shl_assign_impl! { $t, isize }
)*) )*)
} }
shl_assign_impl_all! { u8 u16 u32 u64 usize i8 i16 i32 i64 isize } shl_assign_impl_all! { u8 u16 u32 u64 u128 usize i8 i16 i32 i64 i128 isize }
#[cfg(not(stage0))]
shl_assign_impl_all! { u128 i128 }
/// The `ShrAssign` trait is used to specify the functionality of `>>=`. /// 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, u16 }
shr_assign_impl! { $t, u32 } shr_assign_impl! { $t, u32 }
shr_assign_impl! { $t, u64 } shr_assign_impl! { $t, u64 }
#[cfg(not(stage0))]
shr_assign_impl! { $t, u128 } shr_assign_impl! { $t, u128 }
shr_assign_impl! { $t, usize } shr_assign_impl! { $t, usize }
@ -1875,15 +1826,12 @@ macro_rules! shr_assign_impl_all {
shr_assign_impl! { $t, i16 } shr_assign_impl! { $t, i16 }
shr_assign_impl! { $t, i32 } shr_assign_impl! { $t, i32 }
shr_assign_impl! { $t, i64 } shr_assign_impl! { $t, i64 }
#[cfg(not(stage0))]
shr_assign_impl! { $t, i128 } shr_assign_impl! { $t, i128 }
shr_assign_impl! { $t, isize } shr_assign_impl! { $t, isize }
)*) )*)
} }
shr_assign_impl_all! { u8 u16 u32 u64 usize i8 i16 i32 i64 isize } shr_assign_impl_all! { u8 u16 u32 u64 u128 usize i8 i16 i32 i64 i128 isize }
#[cfg(not(stage0))]
shr_assign_impl_all! { u128 i128 }
/// The `Index` trait is used to specify the functionality of indexing operations /// The `Index` trait is used to specify the functionality of indexing operations
/// like `container[index]` when used in an immutable context. /// like `container[index]` when used in an immutable context.

View File

@ -19,7 +19,6 @@ rustc_const_math = { path = "../librustc_const_math" }
rustc_data_structures = { path = "../librustc_data_structures" } rustc_data_structures = { path = "../librustc_data_structures" }
rustc_errors = { path = "../librustc_errors" } rustc_errors = { path = "../librustc_errors" }
rustc_llvm = { path = "../librustc_llvm" } rustc_llvm = { path = "../librustc_llvm" }
rustc_i128 = { path = "../librustc_i128" }
serialize = { path = "../libserialize" } serialize = { path = "../libserialize" }
syntax = { path = "../libsyntax" } syntax = { path = "../libsyntax" }
syntax_pos = { path = "../libsyntax_pos" } syntax_pos = { path = "../libsyntax_pos" }

View File

@ -30,6 +30,7 @@
#![feature(const_fn)] #![feature(const_fn)]
#![feature(core_intrinsics)] #![feature(core_intrinsics)]
#![feature(field_init_shorthand)] #![feature(field_init_shorthand)]
#![feature(i128_type)]
#![feature(libc)] #![feature(libc)]
#![feature(loop_break_value)] #![feature(loop_break_value)]
#![feature(nonzero)] #![feature(nonzero)]
@ -60,9 +61,6 @@ extern crate syntax_pos;
extern crate serialize as rustc_serialize; // used by deriving extern crate serialize as rustc_serialize; // used by deriving
// SNAP:
extern crate rustc_i128;
#[macro_use] #[macro_use]
mod macros; mod macros;

View File

@ -20,7 +20,6 @@ use ty::{self, Ty, TyCtxt, TypeFoldable};
use syntax::ast::{FloatTy, IntTy, UintTy}; use syntax::ast::{FloatTy, IntTy, UintTy};
use syntax::attr; use syntax::attr;
use syntax_pos::DUMMY_SP; use syntax_pos::DUMMY_SP;
use rustc_i128::u128;
use rustc_const_math::ConstInt; use rustc_const_math::ConstInt;
use std::cmp; use std::cmp;

View File

@ -19,4 +19,3 @@ rustc_errors = { path = "../librustc_errors" }
syntax = { path = "../libsyntax" } syntax = { path = "../libsyntax" }
graphviz = { path = "../libgraphviz" } graphviz = { path = "../libgraphviz" }
syntax_pos = { path = "../libsyntax_pos" } syntax_pos = { path = "../libsyntax_pos" }
rustc_i128 = { path = "../librustc_i128" }

View File

@ -37,8 +37,6 @@ use std::cmp::Ordering;
use rustc_const_math::*; use rustc_const_math::*;
use rustc_errors::DiagnosticBuilder; use rustc_errors::DiagnosticBuilder;
use rustc_i128::{i128, u128};
macro_rules! math { macro_rules! math {
($e:expr, $op:expr) => { ($e:expr, $op:expr) => {
match $op { match $op {

View File

@ -29,6 +29,7 @@
#![feature(box_patterns)] #![feature(box_patterns)]
#![feature(box_syntax)] #![feature(box_syntax)]
#![feature(const_fn)] #![feature(const_fn)]
#![feature(i128_type)]
extern crate arena; extern crate arena;
#[macro_use] extern crate syntax; #[macro_use] extern crate syntax;
@ -41,8 +42,6 @@ extern crate rustc_errors;
extern crate graphviz; extern crate graphviz;
extern crate syntax_pos; extern crate syntax_pos;
extern crate rustc_i128;
// NB: This module needs to be declared first so diagnostics are // NB: This module needs to be declared first so diagnostics are
// registered before they are used. // registered before they are used.
pub mod diagnostics; pub mod diagnostics;

View File

@ -11,4 +11,3 @@ crate-type = ["dylib"]
[dependencies] [dependencies]
serialize = { path = "../libserialize" } serialize = { path = "../libserialize" }
syntax = { path = "../libsyntax" } syntax = { path = "../libsyntax" }
rustc_i128 = { path = "../librustc_i128" }

View File

@ -11,7 +11,6 @@
use std::cmp::Ordering; use std::cmp::Ordering;
use syntax::attr::IntType; use syntax::attr::IntType;
use syntax::ast::{IntTy, UintTy}; use syntax::ast::{IntTy, UintTy};
use rustc_i128::{i128, u128};
use super::is::*; use super::is::*;
use super::us::*; use super::us::*;
@ -54,7 +53,6 @@ macro_rules! bounds {
mod ubounds { mod ubounds {
#![allow(dead_code)] #![allow(dead_code)]
use rustc_i128::{u128, i128};
bounds!{u128: 0, bounds!{u128: 0,
i8 I8MIN I8MAX i16 I16MIN I16MAX i32 I32MIN I32MAX i64 I64MIN I64MAX i128 I128MIN I128MAX 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 u8 U8MIN U8MAX u16 U16MIN U16MAX u32 U32MIN U32MAX u64 U64MIN U64MAX u128 U128MIN U128MAX
@ -65,12 +63,6 @@ mod ubounds {
mod ibounds { mod ibounds {
#![allow(dead_code)] #![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); bounds!(i128, u64 U64MIN U64MAX);
pub const U128MIN: i128 = 0; pub const U128MIN: i128 = 0;
@ -483,10 +475,7 @@ derive_binop!(BitAnd, bitand);
derive_binop!(BitOr, bitor); derive_binop!(BitOr, bitor);
derive_binop!(BitXor, bitxor); derive_binop!(BitXor, bitxor);
#[cfg(not(stage0))]
const I128_MIN: i128 = ::std::i128::MIN; const I128_MIN: i128 = ::std::i128::MIN;
#[cfg(stage0)]
const I128_MIN: i128 = ::std::i64::MIN;
fn check_division( fn check_division(
lhs: ConstInt, lhs: ConstInt,

View File

@ -10,7 +10,6 @@
use syntax::ast; use syntax::ast;
use super::err::*; use super::err::*;
use rustc_i128::i128;
/// Depending on the target only one variant is ever used in a compilation. /// 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 /// Anything else is an error. This invariant is checked at several locations

View File

@ -26,13 +26,11 @@
#![feature(rustc_private)] #![feature(rustc_private)]
#![feature(staged_api)] #![feature(staged_api)]
#![feature(const_fn)] #![feature(const_fn)]
#![cfg_attr(not(stage0), feature(i128))] #![feature(i128)]
#![feature(i128_type)]
extern crate syntax; extern crate syntax;
// SNAP: remove use of this crate
extern crate rustc_i128;
extern crate serialize as rustc_serialize; // used by deriving extern crate serialize as rustc_serialize; // used by deriving
mod float; mod float;

View File

@ -10,7 +10,6 @@
use syntax::ast; use syntax::ast;
use super::err::*; use super::err::*;
use rustc_i128::u128;
/// Depending on the target only one variant is ever used in a compilation. /// 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 /// Anything else is an error. This invariant is checked at several locations

View File

@ -11,4 +11,3 @@ crate-type = ["dylib"]
[dependencies] [dependencies]
log = { path = "../liblog" } log = { path = "../liblog" }
serialize = { path = "../libserialize" } serialize = { path = "../libserialize" }
rustc_i128 = { path = "../librustc_i128" }

View File

@ -36,6 +36,7 @@
#![feature(untagged_unions)] #![feature(untagged_unions)]
#![feature(associated_consts)] #![feature(associated_consts)]
#![feature(unsize)] #![feature(unsize)]
#![feature(i128_type)]
#![cfg_attr(unix, feature(libc))] #![cfg_attr(unix, feature(libc))]
#![cfg_attr(test, feature(test))] #![cfg_attr(test, feature(test))]
@ -47,8 +48,6 @@ extern crate serialize as rustc_serialize; // used by deriving
#[cfg(unix)] #[cfg(unix)]
extern crate libc; extern crate libc;
extern crate rustc_i128;
pub use rustc_serialize::hex::ToHex; pub use rustc_serialize::hex::ToHex;
pub mod array_vec; pub mod array_vec;

View File

@ -13,7 +13,6 @@ use std::marker::PhantomData;
use std::mem; use std::mem;
use blake2b::Blake2bHasher; use blake2b::Blake2bHasher;
use rustc_serialize::leb128; use rustc_serialize::leb128;
use rustc_i128::{u128,i128};
fn write_unsigned_leb128_to_buf(buf: &mut [u8; 16], value: u64) -> usize { 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) leb128::write_unsigned_leb128_to(value as u128, |i, v| buf[i] = v)

View File

@ -1,8 +0,0 @@
[package]
authors = ["The Rust Project Developers"]
name = "rustc_i128"
version = "0.0.0"
[lib]
name = "rustc_i128"
path = "lib.rs"

View File

@ -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;
}

View File

@ -14,6 +14,5 @@ log = { path = "../liblog" }
rustc = { path = "../librustc" } rustc = { path = "../librustc" }
rustc_back = { path = "../librustc_back" } rustc_back = { path = "../librustc_back" }
rustc_const_eval = { path = "../librustc_const_eval" } rustc_const_eval = { path = "../librustc_const_eval" }
rustc_i128 = { path = "../librustc_i128" }
syntax = { path = "../libsyntax" } syntax = { path = "../libsyntax" }
syntax_pos = { path = "../libsyntax_pos" } syntax_pos = { path = "../libsyntax_pos" }

View File

@ -31,6 +31,7 @@
#![cfg_attr(test, feature(test))] #![cfg_attr(test, feature(test))]
#![feature(box_patterns)] #![feature(box_patterns)]
#![feature(box_syntax)] #![feature(box_syntax)]
#![feature(i128_type)]
#![feature(quote)] #![feature(quote)]
#![feature(rustc_diagnostic_macros)] #![feature(rustc_diagnostic_macros)]
#![feature(rustc_private)] #![feature(rustc_private)]
@ -46,8 +47,6 @@ extern crate rustc_back;
extern crate rustc_const_eval; extern crate rustc_const_eval;
extern crate syntax_pos; extern crate syntax_pos;
extern crate rustc_i128;
pub use rustc::lint; pub use rustc::lint;
pub use rustc::middle; pub use rustc::middle;
pub use rustc::session; pub use rustc::session;

View File

@ -33,8 +33,6 @@ use syntax::codemap;
use rustc::hir; use rustc::hir;
use rustc_i128::{i128, u128};
declare_lint! { declare_lint! {
UNUSED_COMPARISONS, UNUSED_COMPARISONS,
Warn, Warn,

View File

@ -18,7 +18,6 @@ rustc_const_math = { path = "../librustc_const_math" }
rustc_data_structures = { path = "../librustc_data_structures" } rustc_data_structures = { path = "../librustc_data_structures" }
rustc_errors = { path = "../librustc_errors" } rustc_errors = { path = "../librustc_errors" }
rustc_llvm = { path = "../librustc_llvm" } rustc_llvm = { path = "../librustc_llvm" }
rustc_i128 = { path = "../librustc_i128" }
serialize = { path = "../libserialize" } serialize = { path = "../libserialize" }
syntax = { path = "../libsyntax" } syntax = { path = "../libsyntax" }
syntax_ext = { path = "../libsyntax_ext" } syntax_ext = { path = "../libsyntax_ext" }

View File

@ -42,7 +42,6 @@ use syntax::attr;
use syntax::ast; use syntax::ast;
use syntax::codemap; use syntax::codemap;
use syntax_pos::{self, Span, BytePos, Pos, DUMMY_SP}; use syntax_pos::{self, Span, BytePos, Pos, DUMMY_SP};
use rustc_i128::{u128, i128};
pub struct DecodeContext<'a, 'tcx: 'a> { pub struct DecodeContext<'a, 'tcx: 'a> {
opaque: opaque::Decoder<'a>, opaque: opaque::Decoder<'a>,

View File

@ -43,8 +43,6 @@ use rustc::hir::itemlikevisit::ItemLikeVisitor;
use rustc::hir::intravisit::{Visitor, NestedVisitorMap}; use rustc::hir::intravisit::{Visitor, NestedVisitorMap};
use rustc::hir::intravisit; use rustc::hir::intravisit;
use rustc_i128::{u128, i128};
use super::index_builder::{FromId, IndexBuilder, Untracked}; use super::index_builder::{FromId, IndexBuilder, Untracked};
pub struct EncodeContext<'a, 'tcx: 'a> { pub struct EncodeContext<'a, 'tcx: 'a> {

View File

@ -20,6 +20,7 @@
#![feature(box_patterns)] #![feature(box_patterns)]
#![feature(conservative_impl_trait)] #![feature(conservative_impl_trait)]
#![feature(core_intrinsics)] #![feature(core_intrinsics)]
#![feature(i128_type)]
#![feature(proc_macro_internals)] #![feature(proc_macro_internals)]
#![feature(quote)] #![feature(quote)]
#![feature(rustc_diagnostic_macros)] #![feature(rustc_diagnostic_macros)]
@ -44,7 +45,6 @@ extern crate rustc_back;
extern crate rustc_const_math; extern crate rustc_const_math;
extern crate rustc_data_structures; extern crate rustc_data_structures;
extern crate rustc_llvm; extern crate rustc_llvm;
extern crate rustc_i128;
mod diagnostics; mod diagnostics;

View File

@ -28,8 +28,6 @@ use syntax_pos::{self, Span};
use std::marker::PhantomData; use std::marker::PhantomData;
use rustc_i128::u128;
pub fn rustc_version() -> String { pub fn rustc_version() -> String {
format!("rustc {}", format!("rustc {}",
option_env!("CFG_VERSION").unwrap_or("unknown version")) option_env!("CFG_VERSION").unwrap_or("unknown version"))

View File

@ -16,6 +16,5 @@ rustc_const_eval = { path = "../librustc_const_eval" }
rustc_const_math = { path = "../librustc_const_math" } rustc_const_math = { path = "../librustc_const_math" }
rustc_data_structures = { path = "../librustc_data_structures" } rustc_data_structures = { path = "../librustc_data_structures" }
rustc_bitflags = { path = "../librustc_bitflags" } rustc_bitflags = { path = "../librustc_bitflags" }
rustc_i128 = { path = "../librustc_i128" }
syntax = { path = "../libsyntax" } syntax = { path = "../libsyntax" }
syntax_pos = { path = "../libsyntax_pos" } syntax_pos = { path = "../libsyntax_pos" }

View File

@ -15,7 +15,6 @@ use std;
use rustc_const_math::{ConstMathErr, Op}; use rustc_const_math::{ConstMathErr, Op};
use rustc_data_structures::fx::FxHashMap; use rustc_data_structures::fx::FxHashMap;
use rustc_data_structures::indexed_vec::Idx; use rustc_data_structures::indexed_vec::Idx;
use rustc_i128::i128;
use build::{BlockAnd, BlockAndExtension, Builder}; use build::{BlockAnd, BlockAndExtension, Builder};
use build::expr::category::{Category, RvalueFunc}; use build::expr::category::{Category, RvalueFunc};

View File

@ -22,6 +22,7 @@ Rust MIR: a lowered representation of Rust. Also: an experiment!
#![feature(associated_consts)] #![feature(associated_consts)]
#![feature(box_patterns)] #![feature(box_patterns)]
#![feature(i128_type)]
#![feature(rustc_diagnostic_macros)] #![feature(rustc_diagnostic_macros)]
#![feature(rustc_private)] #![feature(rustc_private)]
#![feature(staged_api)] #![feature(staged_api)]
@ -40,8 +41,6 @@ extern crate syntax_pos;
extern crate rustc_const_math; extern crate rustc_const_math;
extern crate rustc_const_eval; extern crate rustc_const_eval;
extern crate rustc_i128;
pub mod diagnostics; pub mod diagnostics;
pub mod build; pub mod build;

View File

@ -21,7 +21,6 @@ rustc_data_structures = { path = "../librustc_data_structures" }
rustc_errors = { path = "../librustc_errors" } rustc_errors = { path = "../librustc_errors" }
rustc_incremental = { path = "../librustc_incremental" } rustc_incremental = { path = "../librustc_incremental" }
rustc_llvm = { path = "../librustc_llvm" } rustc_llvm = { path = "../librustc_llvm" }
rustc_i128 = { path = "../librustc_i128" }
rustc_platform_intrinsics = { path = "../librustc_platform_intrinsics" } rustc_platform_intrinsics = { path = "../librustc_platform_intrinsics" }
syntax = { path = "../libsyntax" } syntax = { path = "../libsyntax" }
syntax_pos = { path = "../libsyntax_pos" } syntax_pos = { path = "../libsyntax_pos" }

View File

@ -40,8 +40,6 @@ use syntax::ast;
use syntax::symbol::InternedString; use syntax::symbol::InternedString;
use syntax_pos::Span; use syntax_pos::Span;
use rustc_i128::u128;
pub use context::{CrateContext, SharedCrateContext}; pub use context::{CrateContext, SharedCrateContext};
pub fn type_is_fat_ptr<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, ty: Ty<'tcx>) -> bool { 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] #[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 { fn hi_lo_to_u128(lo: u64, hi: u64) -> u128 {
((hi as u128) << 64) | (lo as u128) ((hi as u128) << 64) | (lo as u128)
} }

View File

@ -33,8 +33,6 @@ use builder::Builder;
use rustc::session::Session; use rustc::session::Session;
use syntax_pos::Span; use syntax_pos::Span;
use rustc_i128::u128;
use std::cmp::Ordering; use std::cmp::Ordering;
use std::iter; use std::iter;

View File

@ -29,6 +29,7 @@
#![feature(const_fn)] #![feature(const_fn)]
#![feature(custom_attribute)] #![feature(custom_attribute)]
#![allow(unused_attributes)] #![allow(unused_attributes)]
#![feature(i128_type)]
#![feature(libc)] #![feature(libc)]
#![feature(quote)] #![feature(quote)]
#![feature(rustc_diagnostic_macros)] #![feature(rustc_diagnostic_macros)]
@ -53,7 +54,6 @@ extern crate rustc_const_eval;
#[macro_use] #[macro_use]
#[no_link] #[no_link]
extern crate rustc_bitflags; extern crate rustc_bitflags;
extern crate rustc_i128;
#[macro_use] extern crate log; #[macro_use] extern crate log;
#[macro_use] extern crate syntax; #[macro_use] extern crate syntax;

View File

@ -43,8 +43,6 @@ use std::ptr;
use super::operand::{OperandRef, OperandValue}; use super::operand::{OperandRef, OperandValue};
use super::MirContext; use super::MirContext;
use rustc_i128::{u128, i128};
/// A sized constant rvalue. /// A sized constant rvalue.
/// The LLVM type might not be the same for a single Rust type, /// 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. /// e.g. each enum variant would have its own LLVM struct type.

View File

@ -7,6 +7,3 @@ version = "0.0.0"
name = "serialize" name = "serialize"
path = "lib.rs" path = "lib.rs"
crate-type = ["dylib", "rlib"] crate-type = ["dylib", "rlib"]
[dependencies]
rustc_i128 = { path = "../librustc_i128" }

View File

@ -211,8 +211,6 @@ use std::string;
use std::{char, f64, fmt, str}; use std::{char, f64, fmt, str};
use std; use std;
use rustc_i128::{i128, u128};
use Encodable; use Encodable;
/// Represents a json value /// Represents a json value

View File

@ -8,8 +8,6 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
use rustc_i128::{i128, u128};
#[inline] #[inline]
fn write_to_vec(vec: &mut Vec<u8>, position: usize, byte: u8) { fn write_to_vec(vec: &mut Vec<u8>, position: usize, byte: u8) {
if position == vec.len() { if position == vec.len() {

View File

@ -30,14 +30,13 @@ Core encoding and decoding interfaces.
#![feature(box_syntax)] #![feature(box_syntax)]
#![feature(collections)] #![feature(collections)]
#![feature(core_intrinsics)] #![feature(core_intrinsics)]
#![feature(i128_type)]
#![feature(specialization)] #![feature(specialization)]
#![feature(staged_api)] #![feature(staged_api)]
#![cfg_attr(test, feature(test))] #![cfg_attr(test, feature(test))]
extern crate collections; extern crate collections;
extern crate rustc_i128;
pub use self::serialize::{Decoder, Encoder, Decodable, Encodable}; pub use self::serialize::{Decoder, Encoder, Decodable, Encodable};
pub use self::serialize::{SpecializationError, SpecializedEncoder, SpecializedDecoder}; pub use self::serialize::{SpecializationError, SpecializedEncoder, SpecializedDecoder};

View File

@ -13,8 +13,6 @@ use std::borrow::Cow;
use std::io::{self, Write}; use std::io::{self, Write};
use serialize; use serialize;
use rustc_i128::{i128, u128};
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Encoder // Encoder
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------

View File

@ -20,7 +20,6 @@ use std::path;
use std::rc::Rc; use std::rc::Rc;
use std::cell::{Cell, RefCell}; use std::cell::{Cell, RefCell};
use std::sync::Arc; use std::sync::Arc;
use rustc_i128::{i128, u128};
pub trait Encoder { pub trait Encoder {
type Error; type Error;
@ -333,14 +332,12 @@ impl Decodable for u64 {
} }
} }
#[cfg(not(stage0))]
impl Encodable for u128 { impl Encodable for u128 {
fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
s.emit_u128(*self) s.emit_u128(*self)
} }
} }
#[cfg(not(stage0))]
impl Decodable for u128 { impl Decodable for u128 {
fn decode<D: Decoder>(d: &mut D) -> Result<u128, D::Error> { fn decode<D: Decoder>(d: &mut D) -> Result<u128, D::Error> {
d.read_u128() d.read_u128()
@ -407,14 +404,12 @@ impl Decodable for i64 {
} }
} }
#[cfg(not(stage0))]
impl Encodable for i128 { impl Encodable for i128 {
fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> { fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
s.emit_i128(*self) s.emit_i128(*self)
} }
} }
#[cfg(not(stage0))]
impl Decodable for i128 { impl Decodable for i128 {
fn decode<D: Decoder>(d: &mut D) -> Result<i128, D::Error> { fn decode<D: Decoder>(d: &mut D) -> Result<i128, D::Error> {
d.read_i128() d.read_i128()

View File

@ -399,7 +399,6 @@ pub use core::i32;
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
pub use core::i64; pub use core::i64;
#[unstable(feature = "i128", issue = "35118")] #[unstable(feature = "i128", issue = "35118")]
#[cfg(not(stage0))]
pub use core::i128; pub use core::i128;
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
pub use core::usize; pub use core::usize;
@ -430,7 +429,6 @@ pub use core_collections::vec;
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
pub use std_unicode::char; pub use std_unicode::char;
#[unstable(feature = "i128", issue = "35118")] #[unstable(feature = "i128", issue = "35118")]
#[cfg(not(stage0))]
pub use core::u128; pub use core::u128;
pub mod f32; pub mod f32;

View File

@ -15,4 +15,3 @@ rustc_bitflags = { path = "../librustc_bitflags" }
syntax_pos = { path = "../libsyntax_pos" } syntax_pos = { path = "../libsyntax_pos" }
rustc_errors = { path = "../librustc_errors" } rustc_errors = { path = "../librustc_errors" }
rustc_data_structures = { path = "../librustc_data_structures" } rustc_data_structures = { path = "../librustc_data_structures" }
rustc_i128 = { path = "../librustc_i128" }

View File

@ -33,8 +33,6 @@ use std::u32;
use serialize::{self, Encodable, Decodable, Encoder, Decoder}; use serialize::{self, Encodable, Decodable, Encoder, Decoder};
use rustc_i128::{u128, i128};
/// An identifier contains a Name (index into the interner /// An identifier contains a Name (index into the interner
/// table) and a SyntaxContext to track renaming and /// table) and a SyntaxContext to track renaming and
/// macro expansion per Flatt et al., "Macros That Work Together" /// macro expansion per Flatt et al., "Macros That Work Together"

View File

@ -16,7 +16,6 @@ use codemap::{dummy_spanned, respan, Spanned};
use ext::base::ExtCtxt; use ext::base::ExtCtxt;
use ptr::P; use ptr::P;
use symbol::{Symbol, keywords}; use symbol::{Symbol, keywords};
use rustc_i128::u128;
// Transitional reexports so qquote can find the paths it is looking for // Transitional reexports so qquote can find the paths it is looking for
mod syntax { mod syntax {

View File

@ -41,7 +41,6 @@ pub mod rt {
pub use parse::new_parser_from_tts; pub use parse::new_parser_from_tts;
pub use syntax_pos::{BytePos, Span, DUMMY_SP}; pub use syntax_pos::{BytePos, Span, DUMMY_SP};
pub use codemap::{dummy_spanned}; pub use codemap::{dummy_spanned};
use rustc_i128::{u128};
pub trait ToTokens { pub trait ToTokens {
fn to_tokens(&self, _cx: &ExtCtxt) -> Vec<TokenTree>; fn to_tokens(&self, _cx: &ExtCtxt) -> Vec<TokenTree>;

View File

@ -33,6 +33,7 @@
#![feature(unicode)] #![feature(unicode)]
#![feature(rustc_diagnostic_macros)] #![feature(rustc_diagnostic_macros)]
#![feature(specialization)] #![feature(specialization)]
#![feature(i128_type)]
extern crate serialize; extern crate serialize;
#[macro_use] extern crate log; #[macro_use] extern crate log;
@ -42,8 +43,6 @@ pub extern crate rustc_errors as errors;
extern crate syntax_pos; extern crate syntax_pos;
extern crate rustc_data_structures; extern crate rustc_data_structures;
extern crate rustc_i128;
extern crate serialize as rustc_serialize; // used by deriving 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 // A variant of 'try!' that panics on an Err. This is used as a crutch on the

View File

@ -28,8 +28,6 @@ use std::path::{Path, PathBuf};
use std::rc::Rc; use std::rc::Rc;
use std::str; use std::str;
use rustc_i128::u128;
pub type PResult<'a, T> = Result<T, DiagnosticBuilder<'a>>; pub type PResult<'a, T> = Result<T, DiagnosticBuilder<'a>>;
#[macro_use] #[macro_use]

View File

@ -65,8 +65,6 @@ use std::path::{Path, PathBuf};
use std::rc::Rc; use std::rc::Rc;
use std::slice; use std::slice;
use rustc_i128::u128;
bitflags! { bitflags! {
flags Restrictions: u8 { flags Restrictions: u8 {
const RESTRICTION_STMT_EXPR = 1 << 0, const RESTRICTION_STMT_EXPR = 1 << 0,

View File

@ -29,8 +29,6 @@ use std_inject;
use symbol::{Symbol, keywords}; use symbol::{Symbol, keywords};
use tokenstream::{self, TokenTree}; use tokenstream::{self, TokenTree};
use rustc_i128::i128;
use std::ascii; use std::ascii;
use std::io::{self, Write, Read}; use std::io::{self, Write, Read};
use std::iter; use std::iter;

View File

@ -12,5 +12,5 @@
# tarball for a stable release you'll likely see `1.x.0-$date` where `1.x.0` was # tarball for a stable release you'll likely see `1.x.0-$date` where `1.x.0` was
# released on `$date` # released on `$date`
rustc: beta-2016-12-20 rustc: beta-2017-02-01
cargo: bfee18f73287687c543bda8c35e4e33808792715 cargo: bfee18f73287687c543bda8c35e4e33808792715