about summary refs log tree commit diff
path: root/src/librustc_llvm/lib.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-01-16 12:20:03 -0800
committerSteve Klabnik <steve@steveklabnik.com>2015-01-17 10:51:07 -0500
commit34fa70fba5425cbbb96bce783e9fd5c23dd9b471 (patch)
tree6ce5ed5ec0ec21efdfc061c6382dcd2403f6f6d0 /src/librustc_llvm/lib.rs
parent02968389dcbc32c757ff5d8a3e7bf96c5d9d4225 (diff)
downloadrust-34fa70fba5425cbbb96bce783e9fd5c23dd9b471.tar.gz
rust-34fa70fba5425cbbb96bce783e9fd5c23dd9b471.zip
std: Move the bitflags! macro to a gated crate
In accordance with [collections reform part 2][rfc] this macro has been moved to
an external [bitflags crate][crate] which is [available though
crates.io][cratesio]. Inside the standard distribution the macro has been moved
to a crate called `rustc_bitflags` for current users to continue using.

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0509-collections-reform-part-2.md
[crate]: https://github.com/rust-lang/bitflags
[cratesio]: http://crates.io/crates/bitflags

The major user of `bitflags!` in terms of a public-facing possibly-stable API
today is the `FilePermissions` structure inside of `std::io`. This user,
however, will likely no longer use `bitflags!` after I/O reform has landed. To
prevent breaking APIs today, this structure remains as-is.

Current users of the `bitflags!` macro should add this to their `Cargo.toml`:

    bitflags = "0.1"

and this to their crate root:

    #[macro_use] extern crate bitflags;

Due to the removal of a public macro, this is a:

[breaking-change]
Diffstat (limited to 'src/librustc_llvm/lib.rs')
-rw-r--r--src/librustc_llvm/lib.rs1
1 files changed, 1 insertions, 0 deletions
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::*;