Skip to content

Commit b4d2c2f

Browse files
committed
Require the "unstable" feature for the C API.
1 parent 4f2ef05 commit b4d2c2f

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

.travis.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ script:
77
- cargo build
88
- cargo doc
99
- cargo test
10-
- "(cd capi/ctest; ./build-and-test.sh)"
10+
- "if [ $TRAVIS_RUST_VERSION = nightly ]; then cargo test --features unstable; fi"
11+
- "if [ $TRAVIS_RUST_VERSION = nightly ]; then (cd capi/ctest; ./build-and-test.sh); fi"
1112
after_success: curl https://raw.githubusercontent.com/kmcallister/travis-doc-upload/master/travis-doc-upload.sh | sh
1213
notifications:
1314
webhooks: http://build.servo.org:54856/travis

capi/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ libc = "0.1"
1616

1717
[dependencies.tendril]
1818
path = "../"
19+
features = ["unstable"] # Drop flags and C API don’t play friends
1920

2021
[build-dependencies]
2122
gcc = "0"

src/util.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
// option. This file may not be copied, modified, or distributed
55
// except according to those terms.
66

7-
#[cfg(feature = "unstable")] use core::nonzero::NonZero;
87
use std::{slice, intrinsics};
98
use std::mem;
109

@@ -41,6 +40,8 @@ pub unsafe fn copy_lifetime<'a, S: ?Sized, T: ?Sized + 'a>
4140
mem::transmute(ptr)
4241
}
4342

43+
#[cfg(feature = "unstable")] pub use core::nonzero::NonZero;
44+
4445
#[cfg(not(feature = "unstable"))]
4546
#[derive(Copy, Clone)]
4647
pub struct NonZero<T>(T);

0 commit comments

Comments
 (0)