From 8c994a1237d1c79811920cf852d0b801b8518336 Mon Sep 17 00:00:00 2001 From: Vadim Chugunov Date: Sat, 23 Aug 2014 00:59:25 -0700 Subject: [PATCH] Remove stage0 attributes. --- src/compiletest/runtest.rs | 5 ----- src/compiletest/util.rs | 4 ---- src/etc/mklldeps.py | 2 -- src/librustdoc/plugins.rs | 4 +--- src/librustrt/args.rs | 1 - src/librustrt/libunwind.rs | 1 - src/librustrt/stack.rs | 4 ---- src/librustrt/unwind.rs | 3 +++ src/librustuv/uvll.rs | 1 - src/libstd/dynamic_lib.rs | 1 - src/libstd/os.rs | 1 - src/test/run-pass/dupe-first-attr.rc | 1 - src/test/run-pass/intrinsic-alignment.rs | 1 - src/test/run-pass/rec-align-u64.rs | 1 - 14 files changed, 4 insertions(+), 26 deletions(-) diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs index 94b6ea0d7b44..b36bc96cd351 100644 --- a/src/compiletest/runtest.rs +++ b/src/compiletest/runtest.rs @@ -17,7 +17,6 @@ use header; use procsrv; use util::logv; #[cfg(target_os = "windows")] -#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot use util; use std::io::File; @@ -819,7 +818,6 @@ fn check_expected_errors(expected_errors: Vec , }).collect:: >(); #[cfg(target_os = "windows")] - #[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot fn to_lower( s : &str ) -> String { let i = s.chars(); let c : Vec = i.map( |c| { @@ -833,7 +831,6 @@ fn check_expected_errors(expected_errors: Vec , } #[cfg(target_os = "windows")] - #[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot fn prefix_matches( line : &str, prefix : &str ) -> bool { to_lower(line).as_slice().starts_with(to_lower(prefix).as_slice()) } @@ -1251,7 +1248,6 @@ fn make_cmdline(_libpath: &str, prog: &str, args: &[String]) -> String { } #[cfg(target_os = "windows")] -#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot fn make_cmdline(libpath: &str, prog: &str, args: &[String]) -> String { format!("{} {} {}", lib_path_cmd_prefix(libpath), prog, args.connect(" ")) } @@ -1259,7 +1255,6 @@ fn make_cmdline(libpath: &str, prog: &str, args: &[String]) -> String { // Build the LD_LIBRARY_PATH variable as it would be seen on the command line // for diagnostic purposes #[cfg(target_os = "windows")] -#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot fn lib_path_cmd_prefix(path: &str) -> String { format!("{}=\"{}\"", util::lib_path_env_var(), util::make_new_path(path)) } diff --git a/src/compiletest/util.rs b/src/compiletest/util.rs index 8947856e332a..22b5600d5bfc 100644 --- a/src/compiletest/util.rs +++ b/src/compiletest/util.rs @@ -11,7 +11,6 @@ use common::Config; #[cfg(target_os = "windows")] -#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot use std::os::getenv; /// Conversion table from triple OS name to Rust SYSNAME @@ -36,7 +35,6 @@ pub fn get_os(triple: &str) -> &'static str { } #[cfg(target_os = "windows")] -#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot pub fn make_new_path(path: &str) -> String { // Windows just uses PATH as the library search path, so we have to @@ -50,11 +48,9 @@ pub fn make_new_path(path: &str) -> String { } #[cfg(target_os = "windows")] -#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot pub fn lib_path_env_var() -> &'static str { "PATH" } #[cfg(target_os = "windows")] -#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot pub fn path_div() -> &'static str { ";" } pub fn logv(config: &Config, s: String) { diff --git a/src/etc/mklldeps.py b/src/etc/mklldeps.py index 5d0f35fbd606..f184e07891b9 100644 --- a/src/etc/mklldeps.py +++ b/src/etc/mklldeps.py @@ -68,8 +68,6 @@ for llconfig in sys.argv[4:]: ] f.write("#[cfg(" + ', '.join(cfg) + ")]\n") - if os == "windows": # NOTE: Remove after snapshot - f.write("#[cfg(stage0, target_arch = \"%s\", target_os = \"win32\")]\n" % (arch,)) version = run([llconfig, '--version']).strip() diff --git a/src/librustdoc/plugins.rs b/src/librustdoc/plugins.rs index b2edf5d6a2bc..fe217a6d123a 100644 --- a/src/librustdoc/plugins.rs +++ b/src/librustdoc/plugins.rs @@ -74,7 +74,6 @@ impl PluginManager { } #[cfg(target_os = "windows")] -#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot fn libname(mut n: String) -> String { n.push_str(".dll"); n @@ -86,8 +85,7 @@ fn libname(mut n: String) -> String { n } -#[cfg(not(stage0), not(target_os="windows"), not(target_os="macos"))] -#[cfg(stage0, not(target_os="win32"), not(target_os="macos"))] // NOTE: Remove after snapshot +#[cfg(not(target_os="windows"), not(target_os="macos"))] fn libname(n: String) -> String { let mut i = String::from_str("lib"); i.push_str(n.as_slice()); diff --git a/src/librustrt/args.rs b/src/librustrt/args.rs index 453a9307579d..6ac36f8b856b 100644 --- a/src/librustrt/args.rs +++ b/src/librustrt/args.rs @@ -148,7 +148,6 @@ mod imp { #[cfg(target_os = "macos")] #[cfg(target_os = "ios")] #[cfg(target_os = "windows")] -#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot mod imp { use core::prelude::*; use collections::vec::Vec; diff --git a/src/librustrt/libunwind.rs b/src/librustrt/libunwind.rs index 8d2305a8a806..a43920d27a76 100644 --- a/src/librustrt/libunwind.rs +++ b/src/librustrt/libunwind.rs @@ -88,7 +88,6 @@ pub type _Unwind_Exception_Cleanup_Fn = #[cfg(target_os = "linux")] #[cfg(target_os = "freebsd")] #[cfg(target_os = "windows")] -#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot #[link(name = "gcc_s")] extern {} diff --git a/src/librustrt/stack.rs b/src/librustrt/stack.rs index 772b5da8cd5b..3190e9f78414 100644 --- a/src/librustrt/stack.rs +++ b/src/librustrt/stack.rs @@ -200,7 +200,6 @@ pub unsafe fn record_sp_limit(limit: uint) { asm!("movq $0, %fs:112" :: "r"(limit) :: "volatile") } #[cfg(target_arch = "x86_64", target_os = "windows")] #[inline(always)] - #[cfg(stage0, target_arch = "x86_64", target_os = "win32")] // NOTE: Remove after snapshot unsafe fn target_record_sp_limit(limit: uint) { // see: http://en.wikipedia.org/wiki/Win32_Thread_Information_Block // store this inside of the "arbitrary data slot", but double the size @@ -229,7 +228,6 @@ pub unsafe fn record_sp_limit(limit: uint) { asm!("movl $0, %gs:48" :: "r"(limit) :: "volatile") } #[cfg(target_arch = "x86", target_os = "windows")] #[inline(always)] - #[cfg(stage0, target_arch = "x86", target_os = "win32")] // NOTE: Remove after snapshot unsafe fn target_record_sp_limit(limit: uint) { // see: http://en.wikipedia.org/wiki/Win32_Thread_Information_Block // store this inside of the "arbitrary data slot" @@ -283,7 +281,6 @@ pub unsafe fn get_sp_limit() -> uint { return limit; } #[cfg(target_arch = "x86_64", target_os = "windows")] #[inline(always)] - #[cfg(stage0, target_arch = "x86_64", target_os = "win32")] // NOTE: Remove after snapshot unsafe fn target_get_sp_limit() -> uint { let limit; asm!("movq %gs:0x28, $0" : "=r"(limit) ::: "volatile"); @@ -320,7 +317,6 @@ pub unsafe fn get_sp_limit() -> uint { return limit; } #[cfg(target_arch = "x86", target_os = "windows")] #[inline(always)] - #[cfg(stage0, target_arch = "x86", target_os = "win32")] // NOTE: Remove after snapshot unsafe fn target_get_sp_limit() -> uint { let limit; asm!("movl %fs:0x14, $0" : "=r"(limit) ::: "volatile"); diff --git a/src/librustrt/unwind.rs b/src/librustrt/unwind.rs index 58012002c4f6..08e182a6d6e6 100644 --- a/src/librustrt/unwind.rs +++ b/src/librustrt/unwind.rs @@ -402,8 +402,11 @@ pub mod eabi { use libunwind as uw; use libc::{c_void, c_int}; + #[repr(C)] struct EXCEPTION_RECORD; + #[repr(C)] struct CONTEXT; + #[repr(C)] struct DISPATCHER_CONTEXT; #[repr(C)] diff --git a/src/librustuv/uvll.rs b/src/librustuv/uvll.rs index e7b031c6b518..c7c278675c18 100644 --- a/src/librustuv/uvll.rs +++ b/src/librustuv/uvll.rs @@ -733,7 +733,6 @@ extern {} extern {} #[cfg(target_os = "windows")] -#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot #[link(name = "ws2_32")] #[link(name = "psapi")] #[link(name = "iphlpapi")] diff --git a/src/libstd/dynamic_lib.rs b/src/libstd/dynamic_lib.rs index fb951d45c421..16c00d76c546 100644 --- a/src/libstd/dynamic_lib.rs +++ b/src/libstd/dynamic_lib.rs @@ -279,7 +279,6 @@ pub mod dl { } #[cfg(target_os = "windows")] -#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot pub mod dl { use c_str::ToCStr; use iter::Iterator; diff --git a/src/libstd/os.rs b/src/libstd/os.rs index 7780c61e8667..bcdec2e06311 100644 --- a/src/libstd/os.rs +++ b/src/libstd/os.rs @@ -1843,7 +1843,6 @@ pub mod consts { } #[cfg(target_os = "windows")] -#[cfg(stage0, target_os = "win32")] // NOTE: Remove after snapshot pub mod consts { pub use os::arch_consts::ARCH; diff --git a/src/test/run-pass/dupe-first-attr.rc b/src/test/run-pass/dupe-first-attr.rc index f987446c6ad4..30d6b934fa27 100644 --- a/src/test/run-pass/dupe-first-attr.rc +++ b/src/test/run-pass/dupe-first-attr.rc @@ -18,7 +18,6 @@ mod hello; mod hello; #[cfg(target_os = "windows")] -/* NOTE: Remove after snapshot */#[cfg(stage0, target_os = "win32")] mod hello; #[cfg(target_os = "freebsd")] diff --git a/src/test/run-pass/intrinsic-alignment.rs b/src/test/run-pass/intrinsic-alignment.rs index 5d0a3c085b4f..4873dc13c40c 100644 --- a/src/test/run-pass/intrinsic-alignment.rs +++ b/src/test/run-pass/intrinsic-alignment.rs @@ -43,7 +43,6 @@ mod m { } #[cfg(target_os = "windows")] -/* NOTE: Remove after snapshot */#[cfg(stage0, target_os = "win32")] mod m { #[main] #[cfg(target_arch = "x86")] diff --git a/src/test/run-pass/rec-align-u64.rs b/src/test/run-pass/rec-align-u64.rs index 3a4f87701227..8bd7a499de66 100644 --- a/src/test/run-pass/rec-align-u64.rs +++ b/src/test/run-pass/rec-align-u64.rs @@ -56,7 +56,6 @@ mod m { } #[cfg(target_os = "windows")] -/* NOTE: Remove after snapshot */#[cfg(stage0, target_os = "win32")] mod m { #[cfg(target_arch = "x86")] pub mod m {