Auto merge of #34686 - alexcrichton:new-stage, r=luqmana
rustc: Update stage0 to beta-2016-07-06 Hot off the presses, let's update our stage0 compiler!
This commit is contained in:
commit
7ad125c4eb
|
@ -175,7 +175,6 @@ extern "rust-intrinsic" {
|
||||||
/// that `rustc_peek(potentially_uninitialized)` would actually
|
/// that `rustc_peek(potentially_uninitialized)` would actually
|
||||||
/// double-check that dataflow did indeed compute that it is
|
/// double-check that dataflow did indeed compute that it is
|
||||||
/// uninitialized at that point in the control flow.
|
/// uninitialized at that point in the control flow.
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub fn rustc_peek<T>(_: T) -> T;
|
pub fn rustc_peek<T>(_: T) -> T;
|
||||||
|
|
||||||
/// Aborts the execution of the process.
|
/// Aborts the execution of the process.
|
||||||
|
|
|
@ -17,8 +17,6 @@ use session::Session;
|
||||||
use traits;
|
use traits;
|
||||||
use ty::{self, Ty, TyCtxt, TypeFoldable};
|
use ty::{self, Ty, TyCtxt, TypeFoldable};
|
||||||
|
|
||||||
use util::common::slice_pat;
|
|
||||||
|
|
||||||
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;
|
||||||
|
@ -100,7 +98,7 @@ impl TargetDataLayout {
|
||||||
|
|
||||||
let mut dl = TargetDataLayout::default();
|
let mut dl = TargetDataLayout::default();
|
||||||
for spec in sess.target.target.data_layout.split("-") {
|
for spec in sess.target.target.data_layout.split("-") {
|
||||||
match slice_pat(&&spec.split(":").collect::<Vec<_>>()[..]) {
|
match &spec.split(":").collect::<Vec<_>>()[..] {
|
||||||
&["e"] => dl.endian = Endian::Little,
|
&["e"] => dl.endian = Endian::Little,
|
||||||
&["E"] => dl.endian = Endian::Big,
|
&["E"] => dl.endian = Endian::Big,
|
||||||
&["a", ref a..] => dl.aggregate_align = align(a, "a"),
|
&["a", ref a..] => dl.aggregate_align = align(a, "a"),
|
||||||
|
|
|
@ -247,15 +247,3 @@ pub fn path2cstr(p: &Path) -> CString {
|
||||||
pub fn path2cstr(p: &Path) -> CString {
|
pub fn path2cstr(p: &Path) -> CString {
|
||||||
CString::new(p.to_str().unwrap()).unwrap()
|
CString::new(p.to_str().unwrap()).unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME(stage0): remove this
|
|
||||||
// HACK: this is needed because the interpretation of slice
|
|
||||||
// patterns changed between stage0 and now.
|
|
||||||
#[cfg(stage0)]
|
|
||||||
pub fn slice_pat<'a, 'b, T>(t: &'a &'b [T]) -> &'a &'b [T] {
|
|
||||||
t
|
|
||||||
}
|
|
||||||
#[cfg(not(stage0))]
|
|
||||||
pub fn slice_pat<'a, 'b, T>(t: &'a &'b [T]) -> &'b [T] {
|
|
||||||
*t
|
|
||||||
}
|
|
||||||
|
|
|
@ -43,7 +43,6 @@ use rustc::hir::fold::{Folder, noop_fold_pat};
|
||||||
use rustc::hir::print::pat_to_string;
|
use rustc::hir::print::pat_to_string;
|
||||||
use syntax::ptr::P;
|
use syntax::ptr::P;
|
||||||
use rustc::util::nodemap::FnvHashMap;
|
use rustc::util::nodemap::FnvHashMap;
|
||||||
use rustc::util::common::slice_pat;
|
|
||||||
|
|
||||||
pub const DUMMY_WILD_PAT: &'static Pat = &Pat {
|
pub const DUMMY_WILD_PAT: &'static Pat = &Pat {
|
||||||
id: DUMMY_NODE_ID,
|
id: DUMMY_NODE_ID,
|
||||||
|
@ -400,7 +399,7 @@ fn check_exhaustive<'a, 'tcx>(cx: &MatchCheckCtxt<'a, 'tcx>,
|
||||||
hir::MatchSource::ForLoopDesugar => {
|
hir::MatchSource::ForLoopDesugar => {
|
||||||
// `witnesses[0]` has the form `Some(<head>)`, peel off the `Some`
|
// `witnesses[0]` has the form `Some(<head>)`, peel off the `Some`
|
||||||
let witness = match witnesses[0].node {
|
let witness = match witnesses[0].node {
|
||||||
PatKind::TupleStruct(_, ref pats, _) => match slice_pat(&&pats[..]) {
|
PatKind::TupleStruct(_, ref pats, _) => match &pats[..] {
|
||||||
&[ref pat] => &**pat,
|
&[ref pat] => &**pat,
|
||||||
_ => bug!(),
|
_ => bug!(),
|
||||||
},
|
},
|
||||||
|
|
|
@ -16,7 +16,6 @@ use rustc::ty::{self, Ty, TyCtxt};
|
||||||
use middle::const_val::ConstVal;
|
use middle::const_val::ConstVal;
|
||||||
use rustc_const_eval::eval_const_expr_partial;
|
use rustc_const_eval::eval_const_expr_partial;
|
||||||
use rustc_const_eval::EvalHint::ExprTypeChecked;
|
use rustc_const_eval::EvalHint::ExprTypeChecked;
|
||||||
use util::common::slice_pat;
|
|
||||||
use util::nodemap::{FnvHashSet};
|
use util::nodemap::{FnvHashSet};
|
||||||
use lint::{LateContext, LintContext, LintArray};
|
use lint::{LateContext, LintContext, LintArray};
|
||||||
use lint::{LintPass, LateLintPass};
|
use lint::{LintPass, LateLintPass};
|
||||||
|
@ -461,7 +460,7 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> {
|
||||||
// Check for a repr() attribute to specify the size of the
|
// Check for a repr() attribute to specify the size of the
|
||||||
// discriminant.
|
// discriminant.
|
||||||
let repr_hints = cx.lookup_repr_hints(def.did);
|
let repr_hints = cx.lookup_repr_hints(def.did);
|
||||||
match slice_pat(&&**repr_hints) {
|
match &repr_hints[..] {
|
||||||
&[] => {
|
&[] => {
|
||||||
// Special-case types like `Option<extern fn()>`.
|
// Special-case types like `Option<extern fn()>`.
|
||||||
if !is_repr_nullable_ptr(cx, def, substs) {
|
if !is_repr_nullable_ptr(cx, def, substs) {
|
||||||
|
|
|
@ -22,7 +22,6 @@ use rustc::hir::def_id::DefId;
|
||||||
use rustc::hir::print as pprust;
|
use rustc::hir::print as pprust;
|
||||||
use rustc::ty::{self, TyCtxt};
|
use rustc::ty::{self, TyCtxt};
|
||||||
use rustc::ty::subst;
|
use rustc::ty::subst;
|
||||||
use rustc::util::common::slice_pat;
|
|
||||||
|
|
||||||
use rustc_const_eval::lookup_const_by_id;
|
use rustc_const_eval::lookup_const_by_id;
|
||||||
|
|
||||||
|
@ -204,7 +203,7 @@ fn build_struct<'a, 'tcx>(cx: &DocContext, tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
||||||
let variant = tcx.lookup_adt_def(did).struct_variant();
|
let variant = tcx.lookup_adt_def(did).struct_variant();
|
||||||
|
|
||||||
clean::Struct {
|
clean::Struct {
|
||||||
struct_type: match slice_pat(&&*variant.fields) {
|
struct_type: match &variant.fields[..] {
|
||||||
&[] => doctree::Unit,
|
&[] => doctree::Unit,
|
||||||
&[_] if variant.kind == ty::VariantKind::Tuple => doctree::Newtype,
|
&[_] if variant.kind == ty::VariantKind::Tuple => doctree::Newtype,
|
||||||
&[..] if variant.kind == ty::VariantKind::Tuple => doctree::Tuple,
|
&[..] if variant.kind == ty::VariantKind::Tuple => doctree::Tuple,
|
||||||
|
|
|
@ -20,7 +20,6 @@ use std::iter::repeat;
|
||||||
|
|
||||||
use rustc::middle::cstore::LOCAL_CRATE;
|
use rustc::middle::cstore::LOCAL_CRATE;
|
||||||
use rustc::hir::def_id::{CRATE_DEF_INDEX, DefId};
|
use rustc::hir::def_id::{CRATE_DEF_INDEX, DefId};
|
||||||
use rustc::util::common::slice_pat;
|
|
||||||
use syntax::abi::Abi;
|
use syntax::abi::Abi;
|
||||||
use rustc::hir;
|
use rustc::hir;
|
||||||
|
|
||||||
|
@ -471,7 +470,7 @@ impl fmt::Display for clean::Type {
|
||||||
decl.decl)
|
decl.decl)
|
||||||
}
|
}
|
||||||
clean::Tuple(ref typs) => {
|
clean::Tuple(ref typs) => {
|
||||||
match slice_pat(&&**typs) {
|
match &typs[..] {
|
||||||
&[] => primitive_link(f, clean::PrimitiveTuple, "()"),
|
&[] => primitive_link(f, clean::PrimitiveTuple, "()"),
|
||||||
&[ref one] => {
|
&[ref one] => {
|
||||||
primitive_link(f, clean::PrimitiveTuple, "(")?;
|
primitive_link(f, clean::PrimitiveTuple, "(")?;
|
||||||
|
|
|
@ -468,15 +468,3 @@ pub mod __rand {
|
||||||
// the rustdoc documentation for primitive types. Using `include!`
|
// the rustdoc documentation for primitive types. Using `include!`
|
||||||
// because rustdoc only looks for these modules at the crate level.
|
// because rustdoc only looks for these modules at the crate level.
|
||||||
include!("primitive_docs.rs");
|
include!("primitive_docs.rs");
|
||||||
|
|
||||||
// FIXME(stage0): remove this after a snapshot
|
|
||||||
// HACK: this is needed because the interpretation of slice
|
|
||||||
// patterns changed between stage0 and now.
|
|
||||||
#[cfg(stage0)]
|
|
||||||
fn slice_pat<'a, 'b, T>(t: &'a &'b [T]) -> &'a &'b [T] {
|
|
||||||
t
|
|
||||||
}
|
|
||||||
#[cfg(not(stage0))]
|
|
||||||
fn slice_pat<'a, 'b, T>(t: &'a &'b [T]) -> &'b [T] {
|
|
||||||
*t
|
|
||||||
}
|
|
||||||
|
|
|
@ -566,7 +566,7 @@ impl Wtf8 {
|
||||||
if len < 3 {
|
if len < 3 {
|
||||||
return None
|
return None
|
||||||
}
|
}
|
||||||
match ::slice_pat(&&self.bytes[(len - 3)..]) {
|
match &self.bytes[(len - 3)..] {
|
||||||
&[0xED, b2 @ 0xA0...0xAF, b3] => Some(decode_surrogate(b2, b3)),
|
&[0xED, b2 @ 0xA0...0xAF, b3] => Some(decode_surrogate(b2, b3)),
|
||||||
_ => None
|
_ => None
|
||||||
}
|
}
|
||||||
|
@ -578,7 +578,7 @@ impl Wtf8 {
|
||||||
if len < 3 {
|
if len < 3 {
|
||||||
return None
|
return None
|
||||||
}
|
}
|
||||||
match ::slice_pat(&&self.bytes[..3]) {
|
match &self.bytes[..3] {
|
||||||
&[0xED, b2 @ 0xB0...0xBF, b3] => Some(decode_surrogate(b2, b3)),
|
&[0xED, b2 @ 0xB0...0xBF, b3] => Some(decode_surrogate(b2, b3)),
|
||||||
_ => None
|
_ => None
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,7 +117,7 @@ impl Drop for FindNextFileHandle {
|
||||||
|
|
||||||
impl DirEntry {
|
impl DirEntry {
|
||||||
fn new(root: &Arc<PathBuf>, wfd: &c::WIN32_FIND_DATAW) -> Option<DirEntry> {
|
fn new(root: &Arc<PathBuf>, wfd: &c::WIN32_FIND_DATAW) -> Option<DirEntry> {
|
||||||
match ::slice_pat(&&wfd.cFileName[0..3]) {
|
match &wfd.cFileName[0..3] {
|
||||||
// check for '.' and '..'
|
// check for '.' and '..'
|
||||||
&[46, 0, ..] |
|
&[46, 0, ..] |
|
||||||
&[46, 46, 0, ..] => return None,
|
&[46, 46, 0, ..] => return None,
|
||||||
|
|
|
@ -12,6 +12,6 @@
|
||||||
# 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-05-24
|
rustc: beta-2016-07-06
|
||||||
rustc_key: a4922355
|
rustc_key: 411fd48b
|
||||||
cargo: nightly-2016-05-22
|
cargo: nightly-2016-07-05
|
||||||
|
|
Loading…
Reference in New Issue