Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustc: Update stage0 to beta-2016-07-06 #34686

Merged
merged 1 commit into from
Jul 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/libcore/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ extern "rust-intrinsic" {
/// that `rustc_peek(potentially_uninitialized)` would actually
/// double-check that dataflow did indeed compute that it is
/// uninitialized at that point in the control flow.
#[cfg(not(stage0))]
pub fn rustc_peek<T>(_: T) -> T;

/// Aborts the execution of the process.
Expand Down
4 changes: 1 addition & 3 deletions src/librustc/ty/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ use session::Session;
use traits;
use ty::{self, Ty, TyCtxt, TypeFoldable};

use util::common::slice_pat;

use syntax::ast::{FloatTy, IntTy, UintTy};
use syntax::attr;
use syntax_pos::DUMMY_SP;
Expand Down Expand Up @@ -100,7 +98,7 @@ impl TargetDataLayout {

let mut dl = TargetDataLayout::default();
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::Big,
&["a", ref a..] => dl.aggregate_align = align(a, "a"),
Expand Down
12 changes: 0 additions & 12 deletions src/librustc/util/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,15 +247,3 @@ pub fn path2cstr(p: &Path) -> CString {
pub fn path2cstr(p: &Path) -> CString {
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
}
3 changes: 1 addition & 2 deletions src/librustc_const_eval/check_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ use rustc::hir::fold::{Folder, noop_fold_pat};
use rustc::hir::print::pat_to_string;
use syntax::ptr::P;
use rustc::util::nodemap::FnvHashMap;
use rustc::util::common::slice_pat;

pub const DUMMY_WILD_PAT: &'static Pat = &Pat {
id: DUMMY_NODE_ID,
Expand Down Expand Up @@ -400,7 +399,7 @@ fn check_exhaustive<'a, 'tcx>(cx: &MatchCheckCtxt<'a, 'tcx>,
hir::MatchSource::ForLoopDesugar => {
// `witnesses[0]` has the form `Some(<head>)`, peel off the `Some`
let witness = match witnesses[0].node {
PatKind::TupleStruct(_, ref pats, _) => match slice_pat(&&pats[..]) {
PatKind::TupleStruct(_, ref pats, _) => match &pats[..] {
&[ref pat] => &**pat,
_ => bug!(),
},
Expand Down
3 changes: 1 addition & 2 deletions src/librustc_lint/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use rustc::ty::{self, Ty, TyCtxt};
use middle::const_val::ConstVal;
use rustc_const_eval::eval_const_expr_partial;
use rustc_const_eval::EvalHint::ExprTypeChecked;
use util::common::slice_pat;
use util::nodemap::{FnvHashSet};
use lint::{LateContext, LintContext, LintArray};
use lint::{LintPass, LateLintPass};
Expand Down Expand Up @@ -461,7 +460,7 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> {
// Check for a repr() attribute to specify the size of the
// discriminant.
let repr_hints = cx.lookup_repr_hints(def.did);
match slice_pat(&&**repr_hints) {
match &repr_hints[..] {
&[] => {
// Special-case types like `Option<extern fn()>`.
if !is_repr_nullable_ptr(cx, def, substs) {
Expand Down
3 changes: 1 addition & 2 deletions src/librustdoc/clean/inline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ use rustc::hir::def_id::DefId;
use rustc::hir::print as pprust;
use rustc::ty::{self, TyCtxt};
use rustc::ty::subst;
use rustc::util::common::slice_pat;

use rustc_const_eval::lookup_const_by_id;

Expand Down Expand Up @@ -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();

clean::Struct {
struct_type: match slice_pat(&&*variant.fields) {
struct_type: match &variant.fields[..] {
&[] => doctree::Unit,
&[_] if variant.kind == ty::VariantKind::Tuple => doctree::Newtype,
&[..] if variant.kind == ty::VariantKind::Tuple => doctree::Tuple,
Expand Down
3 changes: 1 addition & 2 deletions src/librustdoc/html/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ use std::iter::repeat;

use rustc::middle::cstore::LOCAL_CRATE;
use rustc::hir::def_id::{CRATE_DEF_INDEX, DefId};
use rustc::util::common::slice_pat;
use syntax::abi::Abi;
use rustc::hir;

Expand Down Expand Up @@ -471,7 +470,7 @@ impl fmt::Display for clean::Type {
decl.decl)
}
clean::Tuple(ref typs) => {
match slice_pat(&&**typs) {
match &typs[..] {
&[] => primitive_link(f, clean::PrimitiveTuple, "()"),
&[ref one] => {
primitive_link(f, clean::PrimitiveTuple, "(")?;
Expand Down
12 changes: 0 additions & 12 deletions src/libstd/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -468,15 +468,3 @@ pub mod __rand {
// the rustdoc documentation for primitive types. Using `include!`
// because rustdoc only looks for these modules at the crate level.
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
}
4 changes: 2 additions & 2 deletions src/libstd/sys/common/wtf8.rs
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ impl Wtf8 {
if len < 3 {
return None
}
match ::slice_pat(&&self.bytes[(len - 3)..]) {
match &self.bytes[(len - 3)..] {
&[0xED, b2 @ 0xA0...0xAF, b3] => Some(decode_surrogate(b2, b3)),
_ => None
}
Expand All @@ -578,7 +578,7 @@ impl Wtf8 {
if len < 3 {
return None
}
match ::slice_pat(&&self.bytes[..3]) {
match &self.bytes[..3] {
&[0xED, b2 @ 0xB0...0xBF, b3] => Some(decode_surrogate(b2, b3)),
_ => None
}
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/sys/windows/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ impl Drop for FindNextFileHandle {

impl 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 '..'
&[46, 0, ..] |
&[46, 46, 0, ..] => return None,
Expand Down
6 changes: 3 additions & 3 deletions src/stage0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
# tarball for a stable release you'll likely see `1.x.0-$date` where `1.x.0` was
# released on `$date`

rustc: beta-2016-05-24
rustc_key: a4922355
cargo: nightly-2016-05-22
rustc: beta-2016-07-06
rustc_key: 411fd48b
cargo: nightly-2016-07-05