Skip to content

Commit 6a1cc19

Browse files
committed
Enable building on beta
1 parent de24681 commit 6a1cc19

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

.travis.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
language: rust
2-
rust:
3-
- nightly
42
sudo: false
3+
matrix:
4+
include:
5+
- rust: beta
6+
- rust: nightly
7+
env: FEATURES="--features nightly"
58
script:
6-
- cargo build
7-
- cargo test
8-
- cargo doc --no-deps
9+
- cargo build $FEATURES
10+
- cargo test $FEATURES
11+
- cargo doc --no-deps $FEATURES
912
after_success: |
13+
[ $TRAVIS_RUST_VERSION = nightly ] &&
1014
[ $TRAVIS_BRANCH = master ] &&
1115
[ $TRAVIS_PULL_REQUEST = false ] &&
1216
bash deploy-docs.sh

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ homepage = "https://github.com/contain-rs/linked-hash-map"
1414
documentation = "https://contain-rs.github.io/linked-hash-map/linked_hash_map"
1515
keywords = ["data-structures"]
1616
readme = "README.md"
17+
18+
[features]
19+
nightly = []

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
//! ```
2929
3030
#![forbid(missing_docs)]
31-
#![cfg_attr(test, feature(test))]
31+
#![cfg_attr(all(feature = "nightly", test), feature(test))]
3232

3333
use std::borrow::Borrow;
3434
use std::cmp::Ordering;
@@ -877,7 +877,7 @@ impl<'a, K: Hash + Eq, V, S: BuildHasher> IntoIterator for &'a mut LinkedHashMap
877877
fn into_iter(self) -> IterMut<'a, K, V> { self.iter_mut() }
878878
}
879879

880-
#[cfg(test)]
880+
#[cfg(all(feature = "nightly", test))]
881881
mod bench {
882882
extern crate test;
883883

0 commit comments

Comments
 (0)