diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc/lib.rs | 1 | ||||
| -rw-r--r-- | src/librustc_bitflags/lib.rs (renamed from src/libstd/bitflags.rs) | 14 | ||||
| -rw-r--r-- | src/librustc_llvm/lib.rs | 1 | ||||
| -rw-r--r-- | src/librustc_resolve/lib.rs | 1 | ||||
| -rw-r--r-- | src/libstd/lib.rs | 7 | ||||
| -rw-r--r-- | src/libsyntax/lib.rs | 1 | 
6 files changed, 19 insertions, 6 deletions
| diff --git a/src/librustc/lib.rs b/src/librustc/lib.rs index b79f19413ef..a283fdf36a9 100644 --- a/src/librustc/lib.rs +++ b/src/librustc/lib.rs @@ -44,6 +44,7 @@ extern crate rbml; extern crate collections; #[macro_use] extern crate log; #[macro_use] extern crate syntax; +#[macro_use] #[no_link] extern crate rustc_bitflags; extern crate "serialize" as rustc_serialize; // used by deriving diff --git a/src/libstd/bitflags.rs b/src/librustc_bitflags/lib.rs index 3a059766fef..c47a525552d 100644 --- a/src/libstd/bitflags.rs +++ b/src/librustc_bitflags/lib.rs @@ -8,10 +8,16 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#![crate_name = "rustc_bitflags"] #![unstable] +#![staged_api] +#![crate_type = "rlib"] +#![no_std] //! A typesafe bitmask flag generator. +#[cfg(test)] #[macro_use] extern crate std; + /// The `bitflags!` macro generates a `struct` that holds a set of C-style /// bitmask flags. It is useful for creating typesafe wrappers for C APIs. /// @@ -21,6 +27,8 @@ /// # Example /// /// ```{.rust} +/// #[macro_use] extern crate rustc_bitflags; +/// /// bitflags! { /// flags Flags: u32 { /// const FLAG_A = 0b00000001, @@ -45,6 +53,8 @@ /// The generated `struct`s can also be extended with type and trait implementations: /// /// ```{.rust} +/// #[macro_use] extern crate rustc_bitflags; +/// /// use std::fmt; /// /// bitflags! { @@ -273,8 +283,8 @@ macro_rules! bitflags { #[cfg(test)] #[allow(non_upper_case_globals)] mod tests { - use hash::{self, SipHasher}; - use option::Option::{Some, None}; + use std::hash::{self, SipHasher}; + use std::option::Option::{Some, None}; bitflags! { #[doc = "> The first principle is that you must not fool yourself — and"] diff --git a/src/librustc_llvm/lib.rs b/src/librustc_llvm/lib.rs index 0d1836e0144..59676fa3504 100644 --- a/src/librustc_llvm/lib.rs +++ b/src/librustc_llvm/lib.rs @@ -28,6 +28,7 @@ #![allow(unknown_features)] #![feature(int_uint)] extern crate libc; +#[macro_use] #[no_link] extern crate rustc_bitflags; pub use self::OtherAttribute::*; pub use self::SpecialAttribute::*; diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs index 7743a437858..22064a35058 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -23,6 +23,7 @@ #[macro_use] extern crate log; #[macro_use] extern crate syntax; +#[macro_use] #[no_link] extern crate rustc_bitflags; extern crate rustc; diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 182344452a4..2553bbdf523 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -111,7 +111,7 @@ #![feature(box_syntax)] #![feature(old_impl_check)] #![feature(optin_builtin_traits)] -#![allow(unknown_features)] #![feature(int_uint)] +#![feature(int_uint)] // Don't link to std. We are std. #![no_std] @@ -136,6 +136,8 @@ extern crate alloc; extern crate unicode; extern crate libc; +#[macro_use] #[no_link] extern crate rustc_bitflags; + // Make std testable by not duplicating lang items. See #2912 #[cfg(test)] extern crate "std" as realstd; #[cfg(test)] pub use realstd::marker; @@ -181,9 +183,6 @@ pub use unicode::char; #[macro_use] mod macros; -#[macro_use] -pub mod bitflags; - mod rtdeps; /* The Prelude. */ diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs index 9c947f422e9..096e96b003b 100644 --- a/src/libsyntax/lib.rs +++ b/src/libsyntax/lib.rs @@ -35,6 +35,7 @@ extern crate serialize; extern crate term; extern crate libc; #[macro_use] extern crate log; +#[macro_use] #[no_link] extern crate rustc_bitflags; extern crate "serialize" as rustc_serialize; // used by deriving | 
