diff --git a/.travis.yml b/.travis.yml index 1aead9b6..1497c7a0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,6 +22,26 @@ matrix: rust: stable if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master) + # MSRV + - env: TARGET=thumbv6m-none-eabi + rust: 1.31.0 + if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master) + + # MSRV + - env: TARGET=thumbv7m-none-eabi + rust: 1.31.0 + if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master) + + # MSRV + - env: TARGET=thumbv7em-none-eabi + rust: 1.31.0 + if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master) + + # MSRV + - env: TARGET=thumbv7em-none-eabihf + rust: 1.31.0 + if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master) + - env: TARGET=thumbv6m-none-eabi rust: nightly if: (branch = staging OR branch = trying) OR (type = pull_request AND branch = master) diff --git a/Cargo.toml b/Cargo.toml index 9fa65b6f..8e590914 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,10 +16,10 @@ links = "cortex-m" # prevent multiple versions of this crate to be linked toget [dependencies] aligned = "0.3.1" -bare-metal = "0.2.0" +bare-metal = { version = "0.2.0", features = ["const-fn"] } volatile-register = "0.2.0" [features] +const-fn = [] cm7-r0p1 = [] -const-fn = ["bare-metal/const-fn"] inline-asm = [] diff --git a/ci/script.sh b/ci/script.sh index 20a8ea2c..8046774b 100644 --- a/ci/script.sh +++ b/ci/script.sh @@ -8,7 +8,7 @@ main() { cargo check --target $TARGET if [ $TRAVIS_RUST_VERSION = nightly ]; then - cargo check --target $TARGET --features 'const-fn inline-asm' + cargo check --target $TARGET --features 'inline-asm' fi case $TARGET in @@ -16,7 +16,7 @@ main() { cargo check --target $TARGET --features cm7-r0p1 if [ $TRAVIS_RUST_VERSION = nightly ]; then - cargo check --target $TARGET --features 'cm7-r0p1 const-fn inline-asm' + cargo check --target $TARGET --features 'cm7-r0p1 inline-asm' fi ;; diff --git a/src/lib.rs b/src/lib.rs index fda3e01f..90711bfc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -24,11 +24,10 @@ //! //! The disadvantage is that `inline-asm` requires a nightly toolchain. //! -//! ## `const-fn` +//! # Minimum Supported Rust Version (MSRV) //! -//! Enabling this feature turns the `Mutex.new` constructor into a `const fn`. -//! -//! This feature requires a nightly toolchain. +//! This crate is guaranteed to compile on stable Rust 1.31 and up. It *might* +//! compile with older versions but that may change in any new patch release. #![cfg_attr(feature = "inline-asm", feature(asm))] #![deny(missing_docs)]