diff options
| author | bors <bors@rust-lang.org> | 2014-03-20 11:06:42 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-03-20 11:06:42 -0700 |
| commit | 7334c11b4b196e39da2418a239e2ff916896fa19 (patch) | |
| tree | 40a52d76075a591565c7a81aa300e7e16eefac62 /src/libstd | |
| parent | b568efc0cf173ac7b2d37284beda5fdf8a7686ab (diff) | |
| parent | 11ac4df4d2402188f96fa75b3c9b7962e9bac805 (diff) | |
| download | rust-7334c11b4b196e39da2418a239e2ff916896fa19.tar.gz rust-7334c11b4b196e39da2418a239e2ff916896fa19.zip | |
auto merge of #13026 : alexcrichton/rust/snapshots, r=huonw
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/lib.rs | 8 | ||||
| -rw-r--r-- | src/libstd/ops.rs | 16 | ||||
| -rw-r--r-- | src/libstd/rt/crate_map.rs | 62 | ||||
| -rw-r--r-- | src/libstd/rt/libunwind.rs | 10 | ||||
| -rw-r--r-- | src/libstd/rt/thread.rs | 3 |
5 files changed, 4 insertions, 95 deletions
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 583510a7e80..433400cc9f0 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -51,20 +51,14 @@ #[doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://static.rust-lang.org/doc/master")]; - #[feature(macro_rules, globs, asm, managed_boxes, thread_local, link_args, simd, linkage, default_type_params, phase)]; -// NOTE remove the following two attributes after the next snapshot. -#[allow(unrecognized_lint)]; -#[allow(default_type_param_usage)]; - // Don't link to std. We are std. #[no_std]; -#[deny(non_camel_case_types)]; #[deny(missing_doc)]; -#[allow(unknown_features)]; +#[allow(deprecated_owned_vector)]; // NOTE: remove after stage0 // When testing libstd, bring in libuv as the I/O backend so tests can print // things and all of the std::io tests have an I/O interface to run on top diff --git a/src/libstd/ops.rs b/src/libstd/ops.rs index 849e2a79e08..75928e2921e 100644 --- a/src/libstd/ops.rs +++ b/src/libstd/ops.rs @@ -475,13 +475,6 @@ pub trait Index<Index,Result> { fn index(&self, index: &Index) -> Result; } -/// Dummy dox -#[cfg(stage0)] -pub trait Deref<Result> { - /// dummy dox - fn deref<'a>(&'a self) -> &'a Result; -} - /** * * The `Deref` trait is used to specify the functionality of dereferencing @@ -509,20 +502,12 @@ pub trait Deref<Result> { * } * ``` */ -#[cfg(not(stage0))] #[lang="deref"] pub trait Deref<Result> { /// The method called to dereference a value fn deref<'a>(&'a self) -> &'a Result; } -/// dummy dox -#[cfg(stage0)] -pub trait DerefMut<Result>: Deref<Result> { - /// dummy dox - fn deref_mut<'a>(&'a mut self) -> &'a mut Result; -} - /** * * The `DerefMut` trait is used to specify the functionality of dereferencing @@ -557,7 +542,6 @@ pub trait DerefMut<Result>: Deref<Result> { * } * ``` */ -#[cfg(not(stage0))] #[lang="deref_mut"] pub trait DerefMut<Result>: Deref<Result> { /// The method called to mutably dereference a value diff --git a/src/libstd/rt/crate_map.rs b/src/libstd/rt/crate_map.rs index 52cced26254..98f4986b2c7 100644 --- a/src/libstd/rt/crate_map.rs +++ b/src/libstd/rt/crate_map.rs @@ -13,11 +13,6 @@ use option::{Some, None, Option}; use ptr::RawPtr; use rt::rtio::EventLoop; -#[cfg(stage0)] use cmp::TotalOrd; -#[cfg(stage0)] use container::MutableSet; -#[cfg(stage0)] use iter::Iterator; -#[cfg(stage0)] use slice::{ImmutableVector, OwnedVector}; - // Need to tell the linker on OS X to not barf on undefined symbols // and instead look them up at runtime, which we need to resolve // the crate_map properly. @@ -25,20 +20,6 @@ use rt::rtio::EventLoop; #[link_args = "-Wl,-U,__rust_crate_map_toplevel"] extern {} -#[cfg(stage0)] -pub struct ModEntry<'a> { - name: &'a str, - log_level: *mut u32 -} - -#[cfg(stage0)] -pub struct CrateMap<'a> { - version: i32, - entries: &'a [ModEntry<'a>], - children: &'a [&'a CrateMap<'a>], - event_loop_factory: Option<fn() -> ~EventLoop>, -} -#[cfg(not(stage0))] pub struct CrateMap<'a> { version: i32, event_loop_factory: Option<fn() -> ~EventLoop>, @@ -121,46 +102,3 @@ pub fn get_crate_map() -> Option<&'static CrateMap<'static>> { } } } - -#[cfg(stage0)] -fn version(crate_map: &CrateMap) -> i32 { - match crate_map.version { - 2 => return 2, - _ => return 0 - } -} - -#[cfg(stage0)] -fn do_iter_crate_map<'a>( - crate_map: &'a CrateMap<'a>, - f: |&'a ModEntry<'a>|, - visited: &mut ~[*CrateMap<'a>]) { - let raw = crate_map as *CrateMap<'a>; - if visited.bsearch(|a| (*a as uint).cmp(&(raw as uint))).is_some() { - return - } - match visited.iter().position(|i| *i as uint > raw as uint) { - Some(i) => visited.insert(i, raw), - None => visited.push(raw), - } - - match version(crate_map) { - 2 => { - let (entries, children) = (crate_map.entries, crate_map.children); - for entry in entries.iter() { - f(entry); - } - for child in children.iter() { - do_iter_crate_map(*child, |x| f(x), visited); - } - }, - _ => fail!("invalid crate map version") - } -} - -/// Iterates recursively over `crate_map` and all child crate maps -#[cfg(stage0)] -pub fn iter_crate_map<'a>(crate_map: &'a CrateMap<'a>, f: |&'a ModEntry<'a>|) { - let mut v = ~[]; - do_iter_crate_map(crate_map, f, &mut v); -} diff --git a/src/libstd/rt/libunwind.rs b/src/libstd/rt/libunwind.rs index 2528a22be9a..fabfa2c8a7a 100644 --- a/src/libstd/rt/libunwind.rs +++ b/src/libstd/rt/libunwind.rs @@ -101,17 +101,11 @@ extern "C" { pub fn _Unwind_Backtrace(trace: _Unwind_Trace_Fn, trace_argument: *libc::c_void) -> _Unwind_Reason_Code; - #[cfg(stage0, not(target_os = "android"))] - pub fn _Unwind_GetIP(ctx: *_Unwind_Context) -> libc::uintptr_t; - #[cfg(stage0, not(target_os = "android"))] - pub fn _Unwind_FindEnclosingFunction(pc: *libc::c_void) -> *libc::c_void; - #[cfg(not(stage0), - not(target_os = "android"), + #[cfg(not(target_os = "android"), not(target_os = "linux", target_arch = "arm"))] pub fn _Unwind_GetIP(ctx: *_Unwind_Context) -> libc::uintptr_t; - #[cfg(not(stage0), - not(target_os = "android"), + #[cfg(not(target_os = "android"), not(target_os = "linux", target_arch = "arm"))] pub fn _Unwind_FindEnclosingFunction(pc: *libc::c_void) -> *libc::c_void; } diff --git a/src/libstd/rt/thread.rs b/src/libstd/rt/thread.rs index e27698d7dd0..0cbd67557de 100644 --- a/src/libstd/rt/thread.rs +++ b/src/libstd/rt/thread.rs @@ -271,7 +271,7 @@ mod imp { // Assumes that we've been dynamically linked to libpthread but that is // currently always the case. Note that you need to check that the symbol // is non-null before calling it! - #[cfg(target_os = "linux", not(stage0))] + #[cfg(target_os = "linux")] fn min_stack_size(attr: *libc::pthread_attr_t) -> libc::size_t { use ptr::RawPtr; type F = extern "C" unsafe fn(*libc::pthread_attr_t) -> libc::size_t; @@ -289,7 +289,6 @@ mod imp { // __pthread_get_minstack() is marked as weak but extern_weak linkage is // not supported on OS X, hence this kludge... #[cfg(not(target_os = "linux"))] - #[cfg(stage0)] fn min_stack_size(_: *libc::pthread_attr_t) -> libc::size_t { PTHREAD_STACK_MIN } |
