about summary refs log tree commit diff
path: root/src/libstd/sys/windows
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-07-29 17:01:14 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-08-03 17:23:01 -0700
commit5cccf3cd256420d9f32c265e83036dea1d5f94d8 (patch)
tree22904c7bb3df0872afa227638aa5e1e4ccb99fbc /src/libstd/sys/windows
parentceded6adb3a4e172eabef09e1c78717a99c16b14 (diff)
downloadrust-5cccf3cd256420d9f32c265e83036dea1d5f94d8.tar.gz
rust-5cccf3cd256420d9f32c265e83036dea1d5f94d8.zip
syntax: Implement #![no_core]
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
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..a4131d4cada 100644
--- a/src/libstd/sys/windows/thread.rs
+++ b/src/libstd/sys/windows/thread.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 alloc::boxed::FnBox;