Skip to content

Commit 66ad520

Browse files
committed
Have Travis run (some) tests on stable Rust.
1 parent 7452b76 commit 66ad520

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

.travis.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ rust:
55
- beta
66
- stable
77
script:
8-
- "if [ $TRAVIS_RUST_VERSION != nightly ]; then cargo build; fi"
9-
- "if [ $TRAVIS_RUST_VERSION = nightly ]; then cargo test; fi"
10-
- "if [ $TRAVIS_RUST_VERSION = nightly ]; then cargo clean; fi"
11-
- "if [ $TRAVIS_RUST_VERSION = nightly ]; then cargo test --features log-events; fi"
8+
- cargo build
9+
- cargo test
10+
- cargo test --features log-events
1211
- "if [ $TRAVIS_RUST_VERSION = nightly ]; then cargo test --features unstable; fi"
13-
- "if [ $TRAVIS_RUST_VERSION = nightly ]; then cd examples/summarize-events/ && cargo build; fi"
12+
- "cd examples/summarize-events/ && cargo build"
1413
notifications:
1514
webhooks: http://build.servo.org:54856/travis

src/atom/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,15 +315,15 @@ impl Deserialize for Atom {
315315
}
316316
}
317317

318-
#[cfg(test)]
318+
#[cfg(all(test, feature = "unstable"))]
319319
mod bench;
320320

321321
#[cfg(test)]
322322
mod tests {
323323
use std::mem;
324324
use std::thread;
325325
use super::{Atom, StringCacheEntry};
326-
use string_cache_shared::{Static, Inline, Dynamic, ENTRY_ALIGNMENT, from_packed_dynamic};
326+
use string_cache_shared::{Static, Inline, Dynamic, ENTRY_ALIGNMENT};
327327

328328
#[test]
329329
fn test_as_slice() {
@@ -546,8 +546,10 @@ mod tests {
546546
/// Atom uses #[unsafe_no_drop_flag] to stay small, so drop() may be called more than once.
547547
/// In calls after the first one, the atom will be filled with a POST_DROP value.
548548
/// drop() must be a no-op in this case.
549+
#[cfg(feature = "unstable")]
549550
#[test]
550551
fn atom_drop_is_idempotent() {
552+
use string_cache_shared::from_packed_dynamic;
551553
unsafe {
552554
assert_eq!(from_packed_dynamic(mem::POST_DROP_U64), None);
553555
}

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
#![crate_type = "rlib"]
1212

1313
#![cfg_attr(test, deny(warnings))]
14-
#![cfg_attr(test, feature(test, filling_drop))]
14+
#![cfg_attr(all(test, feature = "unstable"), feature(test, filling_drop))]
1515
#![cfg_attr(feature = "unstable", feature(unsafe_no_drop_flag, plugin))]
1616
#![cfg_attr(feature = "unstable", plugin(string_cache_plugin))]
1717

18-
#[cfg(test)]
18+
#[cfg(all(test, feature = "unstable"))]
1919
extern crate test;
2020

2121
#[macro_use]

0 commit comments

Comments
 (0)