about summary refs log tree commit diff
path: root/src/libstd/sys/windows
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-08-05 02:00:46 +0000
committerbors <bors@rust-lang.org>2015-08-05 02:00:46 +0000
commitdbe415a4a7c3e10eff6d9a4b08128c341742e401 (patch)
treee1d3a1eac26b8adba127155b7c7d607dafe1908d /src/libstd/sys/windows
parentefdbc0ec7e9bd8d2dadbe78b003fd7facf2a7aae (diff)
parent0d8340327c03f319b49cb91e2e64aa66dd1e76c7 (diff)
downloadrust-dbe415a4a7c3e10eff6d9a4b08128c341742e401.tar.gz
rust-dbe415a4a7c3e10eff6d9a4b08128c341742e401.zip
Auto merge of #27393 - alexcrichton:no-std-changes, r=brson
This commit is an implementation of [RFC 1184][rfc] which tweaks the behavior of
the `#![no_std]` attribute and adds a new `#![no_core]` attribute. The
`#![no_std]` attribute now injects `extern crate core` at the top of the crate
as well as the libcore prelude into all modules (in the same manner as the
standard library's prelude). The `#![no_core]` attribute disables both std and
core injection.

[rfc]: https://github.com/rust-lang/rfcs/pull/1184

Closes #27394
Diffstat (limited to 'src/libstd/sys/windows')
-rw-r--r--src/libstd/sys/windows/backtrace.rs1
-rw-r--r--src/libstd/sys/windows/condvar.rs1
-rw-r--r--src/libstd/sys/windows/ext/fs.rs1
-rw-r--r--src/libstd/sys/windows/fs.rs3
-rw-r--r--src/libstd/sys/windows/handle.rs1
-rw-r--r--src/libstd/sys/windows/net.rs1
-rw-r--r--src/libstd/sys/windows/pipe.rs1
-rw-r--r--src/libstd/sys/windows/rwlock.rs1
-rw-r--r--src/libstd/sys/windows/stack_overflow.rs3
-rw-r--r--src/libstd/sys/windows/thread.rs1
10 files changed, 12 insertions, 2 deletions
diff --git a/src/libstd/sys/windows/backtrace.rs b/src/libstd/sys/windows/backtrace.rs
index 3f595762fc7..d84513c5f95 100644
--- a/src/libstd/sys/windows/backtrace.rs
+++ b/src/libstd/sys/windows/backtrace.rs
@@ -24,6 +24,7 @@
 
 #![allow(dead_code)]
 
+#[cfg(stage0)]
 use prelude::v1::*;
 use io::prelude::*;
 
diff --git a/src/libstd/sys/windows/condvar.rs b/src/libstd/sys/windows/condvar.rs
index 04d62200e9b..f3edcfd420c 100644
--- a/src/libstd/sys/windows/condvar.rs
+++ b/src/libstd/sys/windows/condvar.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[cfg(stage0)]
 use prelude::v1::*;
 
 use cell::UnsafeCell;
diff --git a/src/libstd/sys/windows/ext/fs.rs b/src/libstd/sys/windows/ext/fs.rs
index f629e983ce5..e15d1f0ec15 100644
--- a/src/libstd/sys/windows/ext/fs.rs
+++ b/src/libstd/sys/windows/ext/fs.rs
@@ -12,6 +12,7 @@
 
 #![stable(feature = "rust1", since = "1.0.0")]
 
+#[cfg(stage0)]
 use prelude::v1::*;
 
 use fs::{OpenOptions, Metadata};
diff --git a/src/libstd/sys/windows/fs.rs b/src/libstd/sys/windows/fs.rs
index 4ce6d53cf12..8d81d6576ff 100644
--- a/src/libstd/sys/windows/fs.rs
+++ b/src/libstd/sys/windows/fs.rs
@@ -8,7 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use core::prelude::*;
+#[cfg(stage0)]
+use core::prelude::v1::*;
 use io::prelude::*;
 use os::windows::prelude::*;
 
diff --git a/src/libstd/sys/windows/handle.rs b/src/libstd/sys/windows/handle.rs
index a566c5eff32..91fe131c251 100644
--- a/src/libstd/sys/windows/handle.rs
+++ b/src/libstd/sys/windows/handle.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[cfg(stage0)]
 use prelude::v1::*;
 
 use io::ErrorKind;
diff --git a/src/libstd/sys/windows/net.rs b/src/libstd/sys/windows/net.rs
index d58355ed1fe..f2aca8d1a6e 100644
--- a/src/libstd/sys/windows/net.rs
+++ b/src/libstd/sys/windows/net.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[cfg(stage0)]
 use prelude::v1::*;
 
 use io;
diff --git a/src/libstd/sys/windows/pipe.rs b/src/libstd/sys/windows/pipe.rs
index a7ece66e0f1..4044c429d49 100644
--- a/src/libstd/sys/windows/pipe.rs
+++ b/src/libstd/sys/windows/pipe.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[cfg(stage0)]
 use prelude::v1::*;
 
 use io;
diff --git a/src/libstd/sys/windows/rwlock.rs b/src/libstd/sys/windows/rwlock.rs
index 25865286db0..010ffe76fba 100644
--- a/src/libstd/sys/windows/rwlock.rs
+++ b/src/libstd/sys/windows/rwlock.rs
@@ -8,6 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#[cfg(stage0)]
 use prelude::v1::*;
 
 use cell::UnsafeCell;
diff --git a/src/libstd/sys/windows/stack_overflow.rs b/src/libstd/sys/windows/stack_overflow.rs
index 491b53c4ed9..bc8ee6619f1 100644
--- a/src/libstd/sys/windows/stack_overflow.rs
+++ b/src/libstd/sys/windows/stack_overflow.rs
@@ -8,7 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use core::prelude::*;
+#[cfg(stage0)]
+use core::prelude::v1::*;
 
 use libc::types::os::arch::extra::{LPVOID, DWORD, LONG};
 use libc;
diff --git a/src/libstd/sys/windows/thread.rs b/src/libstd/sys/windows/thread.rs
index 42805c2ac52..15df5d756be 100644
--- a/src/libstd/sys/windows/thread.rs
+++ b/src/libstd/sys/windows/thread.rs
@@ -86,6 +86,7 @@ impl Thread {
 }
 
 pub mod guard {
+    #[cfg(stage0)]
     use prelude::v1::*;
 
     pub unsafe fn current() -> Option<usize> { None }