diff --git a/.cirrus.yml b/.cirrus.yml index db1a90ada9..ffb3d34511 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -14,7 +14,7 @@ task: setup_script: - pkg install -y curl - curl https://sh.rustup.rs -sSf --output rustup.sh - - sh rustup.sh -y --default-toolchain 1.31.0 + - sh rustup.sh -y --default-toolchain 1.36.0 - $HOME/.cargo/bin/rustup target add i686-unknown-freebsd amd64_test_script: - . $HOME/.cargo/env diff --git a/.travis.yml b/.travis.yml index 664905a29a..0e31309cbd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,71 +18,71 @@ matrix: # week. Additionally they're moved to the front of the line to get them in # the Travis OS X build queue first. - env: TARGET="aarch64-apple-ios;armv7-apple-ios;armv7s-apple-ios;i386-apple-ios;x86_64-apple-ios" DISABLE_TESTS=1 - rust: 1.31.0 + rust: 1.36.0 os: osx # Mac builds # These are also moved to be first because they wait in a long queue with # Travis - env: TARGET=i686-apple-darwin - rust: 1.31.0 + rust: 1.36.0 os: osx - env: TARGET=x86_64-apple-darwin - rust: 1.31.0 + rust: 1.36.0 os: osx # Android - env: TARGET=aarch64-linux-android DISABLE_TESTS=1 - rust: 1.31.0 + rust: 1.36.0 - env: TARGET=arm-linux-androideabi DISABLE_TESTS=1 - rust: 1.31.0 + rust: 1.36.0 - env: TARGET=armv7-linux-androideabi DISABLE_TESTS=1 - rust: 1.31.0 + rust: 1.36.0 - env: TARGET=i686-linux-android DISABLE_TESTS=1 - rust: 1.31.0 + rust: 1.36.0 - env: TARGET=x86_64-linux-android DISABLE_TESTS=1 - rust: 1.31.0 + rust: 1.36.0 # Linux - env: TARGET=aarch64-unknown-linux-gnu - rust: 1.31.0 + rust: 1.36.0 - env: TARGET=arm-unknown-linux-gnueabi - rust: 1.31.0 + rust: 1.36.0 - env: TARGET=arm-unknown-linux-musleabi DISABLE_TESTS=1 - rust: 1.31.0 + rust: 1.36.0 - env: TARGET=armv7-unknown-linux-gnueabihf - rust: 1.31.0 + rust: 1.36.0 - env: TARGET=i686-unknown-linux-gnu - rust: 1.31.0 + rust: 1.36.0 - env: TARGET=i686-unknown-linux-musl - rust: 1.31.0 + rust: 1.36.0 - env: TARGET=mips-unknown-linux-gnu - rust: 1.31.0 + rust: 1.36.0 - env: TARGET=mips64-unknown-linux-gnuabi64 - rust: 1.31.0 + rust: 1.36.0 - env: TARGET=mips64el-unknown-linux-gnuabi64 - rust: 1.31.0 + rust: 1.36.0 - env: TARGET=mipsel-unknown-linux-gnu - rust: 1.31.0 + rust: 1.36.0 - env: TARGET=powerpc-unknown-linux-gnu DISABLE_TESTS=1 - rust: 1.31.0 + rust: 1.36.0 - env: TARGET=powerpc64-unknown-linux-gnu - rust: 1.31.0 + rust: 1.36.0 - env: TARGET=powerpc64le-unknown-linux-gnu - rust: 1.31.0 + rust: 1.36.0 - env: TARGET=s390x-unknown-linux-gnu DISABLE_TESTS=1 - rust: 1.31.0 + rust: 1.36.0 - env: TARGET=x86_64-unknown-linux-gnu - rust: 1.31.0 + rust: 1.36.0 - env: TARGET=x86_64-unknown-linux-musl - rust: 1.31.0 + rust: 1.36.0 # *BSD # FreeBSD i686 and x86_64 use Cirrus instead of Travis # - env: TARGET=i686-unknown-freebsd DISABLE_TESTS=1 # - env: TARGET=x86_64-unknown-freebsd DISABLE_TESTS=1 - env: TARGET=x86_64-unknown-netbsd DISABLE_TESTS=1 - rust: 1.31.0 + rust: 1.36.0 # Make sure stable is always working too - env: TARGET=x86_64-unknown-linux-gnu diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f89df4aab..91af769efe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). let _: OsString = readlinkat(dirfd, &path); ``` +- Minimum supported Rust version is now 1.36.0. + ([#1108](https://github.com/nix-rust/nix/pull/1108)) ### Fixed ### Removed diff --git a/README.md b/README.md index 0e540ba5b9..f3a3c09a52 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ Tier 2: ## Usage -`nix` requires Rust 1.31.0 or newer. +`nix` requires Rust 1.36.0 or newer. To use `nix`, first add this to your `Cargo.toml`: diff --git a/test/sys/test_ioctl.rs b/test/sys/test_ioctl.rs index 0a439b3346..9b286aa3f1 100644 --- a/test/sys/test_ioctl.rs +++ b/test/sys/test_ioctl.rs @@ -33,22 +33,22 @@ mod linux { #[test] fn test_op_none() { if cfg!(any(target_arch = "mips", target_arch = "mips64", target_arch="powerpc", target_arch="powerpc64")){ - assert_eq!(request_code_none!(b'q', 10), 0x2000_710A); - assert_eq!(request_code_none!(b'a', 255), 0x2000_61FF); + assert_eq!(request_code_none!(b'q', 10) as u32, 0x2000_710A); + assert_eq!(request_code_none!(b'a', 255) as u32, 0x2000_61FF); } else { - assert_eq!(request_code_none!(b'q', 10), 0x0000_710A); - assert_eq!(request_code_none!(b'a', 255), 0x0000_61FF); + assert_eq!(request_code_none!(b'q', 10) as u32, 0x0000_710A); + assert_eq!(request_code_none!(b'a', 255) as u32, 0x0000_61FF); } } #[test] fn test_op_write() { if cfg!(any(target_arch = "mips", target_arch = "mips64", target_arch="powerpc", target_arch="powerpc64")){ - assert_eq!(request_code_write!(b'z', 10, 1), 0x8001_7A0A); - assert_eq!(request_code_write!(b'z', 10, 512), 0x8200_7A0A); + assert_eq!(request_code_write!(b'z', 10, 1) as u32, 0x8001_7A0A); + assert_eq!(request_code_write!(b'z', 10, 512) as u32, 0x8200_7A0A); } else { - assert_eq!(request_code_write!(b'z', 10, 1), 0x4001_7A0A); - assert_eq!(request_code_write!(b'z', 10, 512), 0x4200_7A0A); + assert_eq!(request_code_write!(b'z', 10, 1) as u32, 0x4001_7A0A); + assert_eq!(request_code_write!(b'z', 10, 512) as u32, 0x4200_7A0A); } } @@ -56,9 +56,11 @@ mod linux { #[test] fn test_op_write_64() { if cfg!(any(target_arch = "mips64", target_arch="powerpc64")){ - assert_eq!(request_code_write!(b'z', 10, (1 as u64) << 32), 0x8000_7A0A); + assert_eq!(request_code_write!(b'z', 10, (1 as u64) << 32) as u32, + 0x8000_7A0A); } else { - assert_eq!(request_code_write!(b'z', 10, (1 as u64) << 32), 0x4000_7A0A); + assert_eq!(request_code_write!(b'z', 10, (1 as u64) << 32) as u32, + 0x4000_7A0A); } } @@ -66,11 +68,11 @@ mod linux { #[test] fn test_op_read() { if cfg!(any(target_arch = "mips", target_arch = "mips64", target_arch="powerpc", target_arch="powerpc64")){ - assert_eq!(request_code_read!(b'z', 10, 1), 0x4001_7A0A); - assert_eq!(request_code_read!(b'z', 10, 512), 0x4200_7A0A); + assert_eq!(request_code_read!(b'z', 10, 1) as u32, 0x4001_7A0A); + assert_eq!(request_code_read!(b'z', 10, 512) as u32, 0x4200_7A0A); } else { - assert_eq!(request_code_read!(b'z', 10, 1), 0x8001_7A0A); - assert_eq!(request_code_read!(b'z', 10, 512), 0x8200_7A0A); + assert_eq!(request_code_read!(b'z', 10, 1) as u32, 0x8001_7A0A); + assert_eq!(request_code_read!(b'z', 10, 512) as u32, 0x8200_7A0A); } } @@ -78,22 +80,25 @@ mod linux { #[test] fn test_op_read_64() { if cfg!(any(target_arch = "mips64", target_arch="powerpc64")){ - assert_eq!(request_code_read!(b'z', 10, (1 as u64) << 32), 0x4000_7A0A); + assert_eq!(request_code_read!(b'z', 10, (1 as u64) << 32) as u32, + 0x4000_7A0A); } else { - assert_eq!(request_code_read!(b'z', 10, (1 as u64) << 32), 0x8000_7A0A); + assert_eq!(request_code_read!(b'z', 10, (1 as u64) << 32) as u32, + 0x8000_7A0A); } } #[test] fn test_op_read_write() { - assert_eq!(request_code_readwrite!(b'z', 10, 1), 0xC001_7A0A); - assert_eq!(request_code_readwrite!(b'z', 10, 512), 0xC200_7A0A); + assert_eq!(request_code_readwrite!(b'z', 10, 1) as u32, 0xC001_7A0A); + assert_eq!(request_code_readwrite!(b'z', 10, 512) as u32, 0xC200_7A0A); } #[cfg(target_pointer_width = "64")] #[test] fn test_op_read_write_64() { - assert_eq!(request_code_readwrite!(b'z', 10, (1 as u64) << 32), 0xC000_7A0A); + assert_eq!(request_code_readwrite!(b'z', 10, (1 as u64) << 32) as u32, + 0xC000_7A0A); } }