]> git.lizzy.rs Git - rust.git/commitdiff
rustc: Update stage0 to beta-2016-07-06
authorAlex Crichton <alex@alexcrichton.com>
Wed, 6 Jul 2016 16:29:15 +0000 (09:29 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 6 Jul 2016 16:29:15 +0000 (09:29 -0700)
Hot off the presses, let's update our stage0 compiler!

src/libcore/intrinsics.rs
src/librustc/ty/layout.rs
src/librustc/util/common.rs
src/librustc_const_eval/check_match.rs
src/librustc_lint/types.rs
src/librustdoc/clean/inline.rs
src/librustdoc/html/format.rs
src/libstd/lib.rs
src/libstd/sys/common/wtf8.rs
src/libstd/sys/windows/fs.rs
src/stage0.txt

index 94baf188bcaeea9d28f582e6071fed9eb30c8afc..cedcd986562109b22c46b77de8c12726e86d2b97 100644 (file)
     /// 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.
index 61c8aa8fcebf368688950ccbc70503f57dc1d816..27ed88e929e76dba833a9702e52d896b03072391 100644 (file)
@@ -17,8 +17,6 @@
 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;
@@ -100,7 +98,7 @@ pub fn parse(sess: &Session) -> 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"),
index 57c429152c89935d72c8add0e7d2b551afd760d0..bdfb97549d5d512647ce80179eb8d38579cd1378 100644 (file)
@@ -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
-}
index a5a9dea61ad7c99661851be39303634677eb4198..307a408d3e66f36f60750c2200589a34d32c5cae 100644 (file)
@@ -43,7 +43,6 @@
 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,
@@ -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!(),
                         },
index 97f97a889edc30431de9fe399b0b4afb679fbea0..5e3ae01591d69c62c544a0e308943f1fafe0b640 100644 (file)
@@ -16,7 +16,6 @@
 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};
@@ -461,7 +460,7 @@ fn check_type_for_ffi(&self,
                 // 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) {
index 8894b9732fe89250f32f7ead6c3ab0de0cf60b4d..3d6925041cf5b0e2839e3e1d5fea9e137f406149 100644 (file)
@@ -22,7 +22,6 @@
 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;
 
@@ -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,
index 77c4a0f8174a3296d00a2a94a480d912375cead7..11c1b8b09d2cc7299ba2acd1630814b6c9b14109 100644 (file)
@@ -20,7 +20,6 @@
 
 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;
 
@@ -471,7 +470,7 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
                        decl.decl)
             }
             clean::Tuple(ref typs) => {
-                match slice_pat(&&**typs) {
+                match &typs[..] {
                     &[] => primitive_link(f, clean::PrimitiveTuple, "()"),
                     &[ref one] => {
                         primitive_link(f, clean::PrimitiveTuple, "(")?;
index a396c7be09ad16db2effaf51845b45085bd80d47..d05a5a0961483f81202dcc14223d20f109223657 100644 (file)
@@ -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
-}
index b6be85a4dfa2879b04548c74964195a5f3f8c1ce..2c1a656290f946a223274910fa6672a6ceabfab0 100644 (file)
@@ -566,7 +566,7 @@ fn final_lead_surrogate(&self) -> Option<u16> {
         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
         }
@@ -578,7 +578,7 @@ fn initial_trail_surrogate(&self) -> Option<u16> {
         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
         }
index c243e890526f78526d1777c7de94862f0b8f87c6..38a17caa2f6524b220c86b4ab423b6490083f21d 100644 (file)
@@ -117,7 +117,7 @@ fn drop(&mut self) {
 
 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,
index 8e46bdfc5b6b81b8534e38d99ef101ca25dd1174..aaf88a67d27499e360c13d89271ec2b3521303f0 100644 (file)
@@ -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