From 2cba3afa78d1eed14db72c0f5f6ab9393efb6eb1 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Thu, 11 Aug 2022 17:29:31 -0600 Subject: [PATCH 1/2] Raise the MSRV to 1.56.1 in anticipation of the next release And fix some documentation lints warned about by the newer rustdoc. --- .cirrus.yml | 28 ++++++---------------------- CHANGELOG.md | 3 +++ Cargo.toml | 2 +- README.md | 2 +- src/sys/signal.rs | 5 +++-- src/sys/socket/addr.rs | 2 +- 6 files changed, 15 insertions(+), 27 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 0ab93ff389..584d916c5a 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -9,7 +9,7 @@ env: RUSTDOCFLAGS: -D warnings TOOL: cargo # The MSRV - TOOLCHAIN: 1.46.0 + TOOLCHAIN: 1.56.1 ZFLAGS: # Tests that don't require executing the build binaries @@ -94,9 +94,6 @@ task: PATH: $HOME/.cargo/bin:$PATH RUSTFLAGS: --cfg qemu -D warnings TOOL: cross - # Cross needs at least 1.51.0 after Serde accidentally raised its MSRV. - # And Clippy has too many false positives from 1.51.0 through 1.53.0 - TOOLCHAIN: 1.54.0 matrix: - name: Linux arm gnueabi env: @@ -146,18 +143,18 @@ task: matrix: - name: Linux aarch64 arm_container: - image: rust:1.46 + image: rust:1.56 env: RUSTFLAGS: --cfg graviton -D warnings TARGET: aarch64-unknown-linux-gnu - name: Linux x86_64 container: - image: rust:1.46 + image: rust:1.56 env: TARGET: x86_64-unknown-linux-gnu - name: Linux x86_64 musl container: - image: rust:1.46 + image: rust:1.56 env: TARGET: x86_64-unknown-linux-musl setup_script: @@ -183,7 +180,7 @@ task: # Tasks for cross-compiling, but no testing task: container: - image: rust:1.46 + image: rust:1.56 env: BUILD: check HOST: x86_64-unknown-linux-gnu @@ -214,10 +211,6 @@ task: - name: Illumos env: TARGET: x86_64-unknown-illumos - # illumos toolchain isn't available via rustup until 1.50 - TOOLCHAIN: 1.50.0 - container: - image: rust:1.50 # Cross claims to support running tests on iOS, but it actually doesn't. # https://github.com/rust-embedded/cross/issues/535 - name: iOS aarch64 @@ -225,16 +218,11 @@ task: # cargo hack tries to invoke the iphonesimulator SDK for iOS NOHACK: 1 TARGET: aarch64-apple-ios - # Rustup only supports cross-building from arbitrary hosts for iOS at - # 1.49.0 and above. Below that it's possible to cross-build from a macOS - # host, but macOS VMs are more expensive than Linux VMs. - TOOLCHAIN: 1.49.0 - name: iOS x86_64 env: # cargo hack tries to invoke the iphonesimulator SDK for iOS NOHACK: 1 TARGET: x86_64-apple-ios - TOOLCHAIN: 1.49.0 # Cross testing on powerpc fails with "undefined reference to renameat2". # Perhaps cross is using too-old a version? - name: Linux powerpc @@ -254,10 +242,6 @@ task: - name: macOS aarch64 env: TARGET: aarch64-apple-darwin - # macOS aarch64 toolchain isn't available via rustup until 1.49 - TOOLCHAIN: 1.49.0 - container: - image: rust:1.49 - name: NetBSD x86_64 env: TARGET: x86_64-unknown-netbsd @@ -271,7 +255,7 @@ task: task: container: - image: rust:1.46 + image: rust:1.56 env: BUILD: check name: Redox x86_64 diff --git a/CHANGELOG.md b/CHANGELOG.md index 51f0f31655..56ab09fff2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ This project adheres to [Semantic Versioning](https://semver.org/). ### Changed +- The MSRV is now 1.56.1 + ([#1792](https://github.com/nix-rust/nix/pull/1792)) + ### Fixed ### Removed diff --git a/Cargo.toml b/Cargo.toml index 1d96efe548..38a4225800 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "nix" description = "Rust friendly bindings to *nix APIs" edition = "2018" version = "0.25.0" -rust-version = "1.46" +rust-version = "1.56" authors = ["The nix-rust Project Developers"] repository = "https://github.com/nix-rust/nix" license = "MIT" diff --git a/README.md b/README.md index 7c13cf201c..7597ba0afc 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ Tier 3: ## Minimum Supported Rust Version (MSRV) -nix is supported on Rust 1.46.0 and higher. Its MSRV will not be +nix is supported on Rust 1.56.1 and higher. Its MSRV will not be changed in the future without bumping the major or minor version. ## Contributing diff --git a/src/sys/signal.rs b/src/sys/signal.rs index 0da9c74ad6..cd3e87ecab 100644 --- a/src/sys/signal.rs +++ b/src/sys/signal.rs @@ -911,10 +911,11 @@ pub fn sigprocmask(how: SigmaskHow, set: Option<&SigSet>, oldset: Option<&mut Si /// # Arguments /// /// * `pid` - Specifies which processes should receive the signal. -/// - If positive, specifies an individual process +/// - If positive, specifies an individual process. /// - If zero, the signal will be sent to all processes whose group /// ID is equal to the process group ID of the sender. This is a -/// variant of [`killpg`]. +#[cfg_attr(target_os = "fuchsia", doc = "variant of `killpg`.")] +#[cfg_attr(not(target_os = "fuchsia"), doc = "variant of [`killpg`].")] /// - If `-1` and the process has super-user privileges, the signal /// is sent to all processes exclusing system processes. /// - If less than `-1`, the signal is sent to all processes whose diff --git a/src/sys/socket/addr.rs b/src/sys/socket/addr.rs index ad917cd08f..6b2ba21c20 100644 --- a/src/sys/socket/addr.rs +++ b/src/sys/socket/addr.rs @@ -2244,7 +2244,7 @@ pub mod sys_control { /// /// # References /// - /// https://developer.apple.com/documentation/kernel/sockaddr_ctl + /// #[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)] #[repr(transparent)] pub struct SysControlAddr(pub(in super::super) libc::sockaddr_ctl); From c6371db662a0b647dc9e45258393017cf27bd6c2 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Sun, 14 Aug 2022 10:12:57 -0600 Subject: [PATCH 2/2] Fix a new clippy lint --- test/sys/test_timerfd.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/sys/test_timerfd.rs b/test/sys/test_timerfd.rs index 927cc70d1d..08e292106c 100644 --- a/test/sys/test_timerfd.rs +++ b/test/sys/test_timerfd.rs @@ -65,5 +65,5 @@ pub fn test_timerfd_unset() { timer.unset().unwrap(); - assert!(timer.get().unwrap() == None); + assert!(timer.get().unwrap().is_none()); }