Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Features/move enum set to libstd #13196

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/libcollections/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ pub use bitv::Bitv;
pub use btree::BTree;
pub use deque::Deque;
pub use dlist::DList;
pub use enum_set::EnumSet;
pub use hashmap::{HashMap, HashSet};
pub use list::List;
pub use lru_cache::LruCache;
Expand All @@ -45,7 +44,6 @@ pub mod bitv;
pub mod btree;
pub mod deque;
pub mod dlist;
pub mod enum_set;
pub mod hashmap;
pub mod list;
pub mod lru_cache;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ use syntax::{ast, ast_map};
use syntax::owned_slice::OwnedSlice;
use syntax::abi::AbiSet;
use syntax;
use collections::enum_set::{EnumSet, CLike};
use std::enum_set::{EnumSet, CLike};

pub type Disr = u64;

Expand Down
2 changes: 1 addition & 1 deletion src/libserialize/collection_impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use std::hash::{Hash, Hasher};
use {Decodable, Encodable, Decoder, Encoder};
use collections::{DList, RingBuf, TreeMap, TreeSet, Deque, HashMap, HashSet,
TrieMap, TrieSet};
use collections::enum_set::{EnumSet, CLike};
use std::enum_set::{EnumSet, CLike};

impl<
E,
Expand Down
10 changes: 7 additions & 3 deletions src/libcollections/enum_set.rs → src/libstd/enum_set.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
Expand All @@ -13,7 +13,10 @@
//! This module defines a container which uses an efficient bit mask
//! representation to hold C-like enum variants.

use std::num::Bitwise;
use num::Bitwise;
use option::{None, Some, Option};
use ops::{BitOr,BitAnd,Sub};
use iter::Iterator;

#[deriving(Clone, Eq, TotalEq, Hash, Show)]
/// A specialized Set implementation to use enum types.
Expand Down Expand Up @@ -137,8 +140,9 @@ impl<E:CLike> Iterator<E> for Items<E> {
#[cfg(test)]
mod test {

use std::cast;
use cast;

use iter::Iterator;
use enum_set::{EnumSet, CLike};

#[deriving(Eq, Show)]
Expand Down
1 change: 1 addition & 0 deletions src/libstd/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ pub mod any;
pub mod option;
pub mod result;
pub mod cell;
pub mod enum_set;


/* Tasks and communication */
Expand Down