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]
This commit is contained in:
Alex Crichton 2015-01-16 12:20:03 -08:00 committed by Steve Klabnik
parent 02968389dc
commit 34fa70fba5
7 changed files with 24 additions and 8 deletions

View file

@ -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::*;