mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-08 01:28:18 +03:00
Move bitflags module to libstd
This will allow us to provide type-safe APIs in libstd that are C-compatible.
This commit is contained in:
@@ -42,7 +42,6 @@
|
||||
pub use treemap::{TreeMap, TreeSet};
|
||||
pub use trie::{TrieMap, TrieSet};
|
||||
|
||||
pub mod bitflags;
|
||||
pub mod bitv;
|
||||
pub mod btree;
|
||||
pub mod deque;
|
||||
|
||||
@@ -17,9 +17,6 @@
|
||||
//! # Example
|
||||
//!
|
||||
//! ~~~rust
|
||||
//! #[feature(phase)];
|
||||
//! #[phase(syntax)] extern crate collections;
|
||||
//!
|
||||
//! bitflags!(Flags: u32 {
|
||||
//! FlagA = 0x00000001,
|
||||
//! FlagB = 0x00000010,
|
||||
@@ -41,9 +38,6 @@
|
||||
//! The generated `struct`s can also be extended with type and trait implementations:
|
||||
//!
|
||||
//! ~~~rust
|
||||
//! #[feature(phase)];
|
||||
//! #[phase(syntax)] extern crate collections;
|
||||
//!
|
||||
//! use std::fmt;
|
||||
//!
|
||||
//! bitflags!(Flags: u32 {
|
||||
@@ -174,6 +168,8 @@ fn sub(&self, other: &$BitFlags) -> $BitFlags {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use ops::{BitOr, BitAnd, Sub};
|
||||
|
||||
bitflags!(Flags: u32 {
|
||||
FlagA = 0x00000001,
|
||||
FlagB = 0x00000010,
|
||||
@@ -142,7 +142,10 @@ fn start(argc: int, argv: **u8) -> int {
|
||||
green::start(argc, argv, rustuv::event_loop, __test::main)
|
||||
}
|
||||
|
||||
/* Exported macros */
|
||||
|
||||
pub mod macros;
|
||||
pub mod bitflags;
|
||||
|
||||
mod rtdeps;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user