Skip to content

Commit

Permalink
Merge pull request #47 from MJDSys/stable_assignment_operators
Browse files Browse the repository at this point in the history
Remove the assignment_operators feature, its requirements are now stable
  • Loading branch information
alexcrichton committed Apr 20, 2016
2 parents 30ccacf + b774494 commit 2b4ad0f
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 15 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ script:
- cargo test --verbose
- cargo test --verbose --features no_std
- if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then
cargo test --verbose --features assignment_operators;
cargo test --verbose --features "no_std assignment_operators";
cargo test --verbose --features "no_std";
fi
- cargo doc
after_success: |
Expand Down
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ A macro to generate structures which behave like bitflags.

[features]
no_std = []
assignment_operators = []
10 changes: 0 additions & 10 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
// must be disabled by default to allow the crate to work on older rust versions.
#![cfg_attr(all(feature = "no_std", not(test)), no_std)]

#![cfg_attr(feature = "assignment_operators", feature(augmented_assignments))]
#![cfg_attr(all(feature = "assignment_operators", test), feature(op_assign_traits))]

#[cfg(all(feature = "no_std", not(test)))]
#[macro_use]
extern crate core as std;
Expand All @@ -37,7 +34,6 @@ pub use std as __core;
/// # Example
///
/// ```{.rust}
/// #![cfg_attr(feature = "assignment_operators", feature(augmented_assignments, op_assign_traits))]
/// #[macro_use]
/// extern crate bitflags;
///
Expand Down Expand Up @@ -66,7 +62,6 @@ pub use std as __core;
/// implementations:
///
/// ```{.rust}
/// #![cfg_attr(feature = "assignment_operators", feature(augmented_assignments, op_assign_traits))]
/// #[macro_use]
/// extern crate bitflags;
///
Expand Down Expand Up @@ -384,7 +379,6 @@ macro_rules! bitflags {
}
}

#[cfg(feature="assignment_operators")]
impl $crate::__core::ops::BitOrAssign for $BitFlags {

/// Adds the set of flags.
Expand All @@ -404,7 +398,6 @@ macro_rules! bitflags {
}
}

#[cfg(feature="assignment_operators")]
impl $crate::__core::ops::BitXorAssign for $BitFlags {

/// Toggles the set of flags.
Expand All @@ -424,7 +417,6 @@ macro_rules! bitflags {
}
}

#[cfg(feature="assignment_operators")]
impl $crate::__core::ops::BitAndAssign for $BitFlags {

/// Disables all flags disabled in the set.
Expand All @@ -444,7 +436,6 @@ macro_rules! bitflags {
}
}

#[cfg(feature="assignment_operators")]
impl $crate::__core::ops::SubAssign for $BitFlags {

/// Disables all flags enabled in the set.
Expand Down Expand Up @@ -671,7 +662,6 @@ mod tests {
assert_eq!(m4, AnotherSetOfFlags::empty());
}

#[cfg(feature="assignment_operators")]
#[test]
fn test_assignment_operators() {
let mut m1 = Flags::empty();
Expand Down
1 change: 0 additions & 1 deletion tests/external.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![allow(dead_code)]
#![cfg_attr(all(feature = "assignment_operators", test), feature(op_assign_traits))]

#[macro_use]
extern crate bitflags;
Expand Down
1 change: 0 additions & 1 deletion tests/external_no_std.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#![cfg(feature = "no_std")]
#![allow(dead_code)]
#![no_std]
#![cfg_attr(all(feature = "assignment_operators", test), feature(op_assign_traits))]

#[macro_use]
extern crate bitflags;
Expand Down

0 comments on commit 2b4ad0f

Please sign in to comment.