From 359ac360a453b31494d18bf838f6620032a663e5 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 14 Feb 2014 10:03:53 -0800 Subject: [PATCH] Register new snapshots This enables the parser error for `extern mod` => `extern crate` transitions. --- src/libstd/hashmap.rs | 6 ++---- src/libstd/rt/env.rs | 11 ----------- src/libstd/rt/local_heap.rs | 3 --- src/libstd/vec.rs | 6 ++---- src/libsyntax/parse/parser.rs | 13 ++++++------- src/snapshots.txt | 8 ++++++++ src/test/auxiliary/crateresolve_calories-1.rs | 5 ----- src/test/auxiliary/crateresolve_calories-2.rs | 5 ----- 8 files changed, 18 insertions(+), 39 deletions(-) diff --git a/src/libstd/hashmap.rs b/src/libstd/hashmap.rs index f8e02c82fcd..1ac599d0654 100644 --- a/src/libstd/hashmap.rs +++ b/src/libstd/hashmap.rs @@ -56,7 +56,7 @@ use container::{Container, Mutable, Map, MutableMap, Set, MutableSet}; use clone::Clone; use cmp::{Eq, Equiv, max}; use default::Default; -#[cfg(not(stage0))] use fmt; +use fmt; use hash::Hash; use iter; use iter::{Iterator, FromIterator, Extendable}; @@ -66,7 +66,7 @@ use num; use option::{None, Option, Some}; use rand::Rng; use rand; -#[cfg(not(stage0))] use result::{Ok, Err}; +use result::{Ok, Err}; use vec::{ImmutableVector, MutableVector, OwnedVector, Items, MutItems}; use vec_ng; use vec_ng::Vec; @@ -597,7 +597,6 @@ impl Clone for HashMap { } } -#[cfg(not(stage0))] impl fmt::Show for HashMap { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { if_ok!(write!(f.buf, r"\{")) @@ -876,7 +875,6 @@ impl Clone for HashSet { } } -#[cfg(not(stage0))] impl fmt::Show for HashSet { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { if_ok!(write!(f.buf, r"\{")) diff --git a/src/libstd/rt/env.rs b/src/libstd/rt/env.rs index 571ed77592f..94f56d42613 100644 --- a/src/libstd/rt/env.rs +++ b/src/libstd/rt/env.rs @@ -10,8 +10,6 @@ //! Runtime environment settings -// NOTE: remove `POISON_ON_FREE` after a snapshot - use from_str::from_str; use option::{Some, None}; use os; @@ -23,7 +21,6 @@ static mut MIN_STACK: uint = 2 * 1024 * 1024; /// This default corresponds to 20M of cache per scheduler (at the default size). static mut MAX_CACHED_STACKS: uint = 10; static mut DEBUG_BORROW: bool = false; -static mut POISON_ON_FREE: bool = false; pub fn init() { unsafe { @@ -43,10 +40,6 @@ pub fn init() { Some(_) => DEBUG_BORROW = true, None => () } - match os::getenv("RUST_POISON_ON_FREE") { - Some(_) => POISON_ON_FREE = true, - None => () - } } } @@ -61,7 +54,3 @@ pub fn max_cached_stacks() -> uint { pub fn debug_borrow() -> bool { unsafe { DEBUG_BORROW } } - -pub fn poison_on_free() -> bool { - unsafe { POISON_ON_FREE } -} diff --git a/src/libstd/rt/local_heap.rs b/src/libstd/rt/local_heap.rs index 7acce2ecb5b..f3474b9401e 100644 --- a/src/libstd/rt/local_heap.rs +++ b/src/libstd/rt/local_heap.rs @@ -17,7 +17,6 @@ use ops::Drop; use option::{Option, None, Some}; use ptr; use ptr::RawPtr; -use rt::env; use rt::global_heap; use rt::local::Local; use rt::task::Task; @@ -41,7 +40,6 @@ pub struct MemoryRegion { pub struct LocalHeap { priv memory_region: MemoryRegion, - priv poison_on_free: bool, priv live_allocs: *mut raw::Box<()>, } @@ -54,7 +52,6 @@ impl LocalHeap { }; LocalHeap { memory_region: region, - poison_on_free: env::poison_on_free(), live_allocs: ptr::mut_null(), } } diff --git a/src/libstd/vec.rs b/src/libstd/vec.rs index cfe2ad5a08a..a1c5e83db44 100644 --- a/src/libstd/vec.rs +++ b/src/libstd/vec.rs @@ -108,7 +108,7 @@ use container::{Container, Mutable}; use cmp::{Eq, TotalOrd, Ordering, Less, Equal, Greater}; use cmp; use default::Default; -#[cfg(not(stage0))] use fmt; +use fmt; use iter::*; use num::{Integer, CheckedAdd, Saturating, checked_next_power_of_two}; use option::{None, Option, Some}; @@ -116,7 +116,7 @@ use ptr::to_unsafe_ptr; use ptr; use ptr::RawPtr; use rt::global_heap::{malloc_raw, realloc_raw, exchange_free}; -#[cfg(not(stage0))] use result::{Ok, Err}; +use result::{Ok, Err}; use mem; use mem::size_of; use kinds::marker; @@ -2643,7 +2643,6 @@ impl DeepClone for ~[A] { } } -#[cfg(not(stage0))] impl<'a, T: fmt::Show> fmt::Show for &'a [T] { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { if_ok!(write!(f.buf, "[")); @@ -2660,7 +2659,6 @@ impl<'a, T: fmt::Show> fmt::Show for &'a [T] { } } -#[cfg(not(stage0))] impl fmt::Show for ~[T] { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { self.as_slice().fmt(f) diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index a02971ae8ea..f602925140b 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -4566,13 +4566,12 @@ impl Parser { let next_is_mod = self.eat_keyword(keywords::Mod); if next_is_mod || self.eat_keyword(keywords::Crate) { - // NOTE(flaper87): Uncomment this when this changes gets into stage0 - // - // if next_is_mod { - // self.span_err(self.span, - // format!("`extern mod` is obsolete, use `extern crate` instead \ - // to refer to external crates.")) - // } + if next_is_mod { + self.span_err(self.span, + format!("`extern mod` is obsolete, use \ + `extern crate` instead \ + to refer to external crates.")) + } return self.parse_item_extern_crate(lo, visibility, attrs); } diff --git a/src/snapshots.txt b/src/snapshots.txt index 2db884fdb64..88966a61835 100644 --- a/src/snapshots.txt +++ b/src/snapshots.txt @@ -1,3 +1,11 @@ +S 2014-02-14 18477ac + freebsd-x86_64 102df7dfab2a1c59d9e2f16a3f02f368310dd022 + linux-i386 fcf5891e9b3c7c9ef5ee5ea37e62089346099425 + linux-x86_64 d7c2df185fd2e25b4b8f5b2caad277b5ba664b81 + macos-i386 + macos-x86_64 + winnt-i386 f78a892f47627f34233e44c2ff4a00b68063a2ce + S 2014-02-12 c62f6ce freebsd-x86_64 737a423c5f803119ff5a692eac432fa9d0c595a8 linux-i386 a7e90e27e8b6a3fa79ddc15f0ed217ccbade875d diff --git a/src/test/auxiliary/crateresolve_calories-1.rs b/src/test/auxiliary/crateresolve_calories-1.rs index 39328f28bea..54219de8107 100644 --- a/src/test/auxiliary/crateresolve_calories-1.rs +++ b/src/test/auxiliary/crateresolve_calories-1.rs @@ -9,11 +9,6 @@ // except according to those terms. #[crate_id="crateresolve_calories#0.1"]; -// NOTE: remove after the next snapshot -#[link(name = "crateresolve_calories", - vers = "0.1", - calories = "100")]; - #[crate_type = "lib"]; pub fn f() -> int { 100 } diff --git a/src/test/auxiliary/crateresolve_calories-2.rs b/src/test/auxiliary/crateresolve_calories-2.rs index edf90589db7..3b949b48613 100644 --- a/src/test/auxiliary/crateresolve_calories-2.rs +++ b/src/test/auxiliary/crateresolve_calories-2.rs @@ -9,11 +9,6 @@ // except according to those terms. #[crate_id="crateresolve_calories#0.1"]; -// NOTE: remove after the next snapshot -#[link(name = "crateresolve_calories", - vers = "0.1", - calories = "200")]; - #[crate_type = "lib"]; pub fn f() -> int { 200 }