diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0fd1ba07..4403cd6a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -296,7 +296,7 @@ jobs: --exclude-features alloc \ --exclude-features unsafe-pinned \ --exclude-features default \ - --version-range 1.82.. \ + --version-range 1.85.. \ --clean-per-version \ ${{matrix.kind}} \ --locked \ @@ -324,7 +324,7 @@ jobs: cargo hack \ --clean-per-run \ --feature-powerset \ - --version-range 1.78.. \ + --version-range 1.85.. \ --clean-per-version \ check \ --locked \ diff --git a/CHANGELOG.md b/CHANGELOG.md index 45f84cd9..8e525b15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `[pin_]init!` now supports attributes on fields (such as `#[cfg(...)]`). - Add a `#[default_error()]` attribute to `[pin_]init!` to override the default error (when no `? Error` is specified). +- Minimum Rust version is bumped to 1.85. ### Removed diff --git a/Cargo.toml b/Cargo.toml index 2edd1efd..4fffda49 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,7 @@ name = "pin-init" version = "0.0.10" edition = "2021" +rust-version = "1.85" authors = [ "Benno Lossin ", diff --git a/examples/big_struct_in_place.rs b/examples/big_struct_in_place.rs index 80f89b5f..c0513992 100644 --- a/examples/big_struct_in_place.rs +++ b/examples/big_struct_in_place.rs @@ -1,8 +1,5 @@ // SPDX-License-Identifier: Apache-2.0 OR MIT -#![cfg_attr(USE_RUSTC_FEATURES, feature(lint_reasons))] -#![cfg_attr(USE_RUSTC_FEATURES, feature(raw_ref_op))] - use pin_init::*; // Struct with size over 1GiB diff --git a/examples/linked_list.rs b/examples/linked_list.rs index 119169e4..424585fe 100644 --- a/examples/linked_list.rs +++ b/examples/linked_list.rs @@ -2,8 +2,6 @@ #![allow(clippy::undocumented_unsafe_blocks)] #![cfg_attr(feature = "alloc", feature(allocator_api))] -#![cfg_attr(USE_RUSTC_FEATURES, feature(lint_reasons))] -#![cfg_attr(USE_RUSTC_FEATURES, feature(raw_ref_op))] use core::{ cell::Cell, diff --git a/examples/mutex.rs b/examples/mutex.rs index d53671f0..8ed2d321 100644 --- a/examples/mutex.rs +++ b/examples/mutex.rs @@ -2,8 +2,6 @@ #![allow(clippy::undocumented_unsafe_blocks)] #![cfg_attr(feature = "alloc", feature(allocator_api))] -#![cfg_attr(USE_RUSTC_FEATURES, feature(lint_reasons))] -#![cfg_attr(USE_RUSTC_FEATURES, feature(raw_ref_op))] #![allow(clippy::missing_safety_doc)] use core::{ diff --git a/examples/pthread_mutex.rs b/examples/pthread_mutex.rs index f3b5cc9b..4a663164 100644 --- a/examples/pthread_mutex.rs +++ b/examples/pthread_mutex.rs @@ -3,8 +3,6 @@ // inspired by #![allow(clippy::undocumented_unsafe_blocks)] #![cfg_attr(feature = "alloc", feature(allocator_api))] -#![cfg_attr(USE_RUSTC_FEATURES, feature(lint_reasons))] -#![cfg_attr(USE_RUSTC_FEATURES, feature(raw_ref_op))] #[cfg(not(windows))] mod pthread_mtx { diff --git a/examples/static_init.rs b/examples/static_init.rs index f7e53d1a..906b96c5 100644 --- a/examples/static_init.rs +++ b/examples/static_init.rs @@ -2,8 +2,6 @@ #![allow(clippy::undocumented_unsafe_blocks)] #![cfg_attr(feature = "alloc", feature(allocator_api))] -#![cfg_attr(USE_RUSTC_FEATURES, feature(lint_reasons))] -#![cfg_attr(USE_RUSTC_FEATURES, feature(raw_ref_op))] #![allow(unused_imports)] use core::{ diff --git a/internal/src/lib.rs b/internal/src/lib.rs index b08dfe00..60d5093f 100644 --- a/internal/src/lib.rs +++ b/internal/src/lib.rs @@ -6,7 +6,6 @@ //! `pin-init` proc macros. -#![cfg_attr(USE_RUSTC_FEATURES, feature(lint_reasons))] // Documentation is done in the pin-init crate instead. #![allow(missing_docs)] diff --git a/src/lib.rs b/src/lib.rs index 64eec095..4f50994b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -263,12 +263,6 @@ //! [`impl Init`]: crate::Init //! [Rust-for-Linux]: https://rust-for-linux.com/ -#![cfg_attr(USE_RUSTC_FEATURES, feature(lint_reasons))] -#![cfg_attr(USE_RUSTC_FEATURES, feature(raw_ref_op))] -#![cfg_attr( - all(any(feature = "alloc", feature = "std"), USE_RUSTC_FEATURES), - feature(new_uninit) -)] #![forbid(missing_docs, unsafe_op_in_unsafe_fn)] #![cfg_attr(not(feature = "std"), no_std)] #![cfg_attr(feature = "alloc", feature(allocator_api))] diff --git a/tests/alloc_fail.rs b/tests/alloc_fail.rs index fea9f058..af134b95 100644 --- a/tests/alloc_fail.rs +++ b/tests/alloc_fail.rs @@ -1,5 +1,4 @@ #![cfg_attr(feature = "alloc", feature(allocator_api))] -#![cfg_attr(USE_RUSTC_FEATURES, feature(lint_reasons))] #[test] #[cfg(feature = "alloc")] diff --git a/tests/cfgs.rs b/tests/cfgs.rs index 7b6d1548..44e33461 100644 --- a/tests/cfgs.rs +++ b/tests/cfgs.rs @@ -1,6 +1,3 @@ -#![cfg_attr(USE_RUSTC_FEATURES, feature(lint_reasons))] -#![cfg_attr(USE_RUSTC_FEATURES, feature(raw_ref_op))] - use pin_init::{pin_data, pin_init, PinInit}; #[pin_data] diff --git a/tests/const-generic-default.rs b/tests/const-generic-default.rs index fb5f4ea1..4069b01c 100644 --- a/tests/const-generic-default.rs +++ b/tests/const-generic-default.rs @@ -1,6 +1,3 @@ -#![cfg_attr(USE_RUSTC_FEATURES, feature(lint_reasons))] -#![cfg_attr(USE_RUSTC_FEATURES, feature(raw_ref_op))] - use pin_init::*; #[pin_data] diff --git a/tests/default_error.rs b/tests/default_error.rs index a0e3d795..dc357626 100644 --- a/tests/default_error.rs +++ b/tests/default_error.rs @@ -1,5 +1,4 @@ #![allow(dead_code)] -#![cfg_attr(USE_RUSTC_FEATURES, feature(lint_reasons))] use pin_init::{init, Init}; diff --git a/tests/init-scope.rs b/tests/init-scope.rs index 24edb855..f588ef00 100644 --- a/tests/init-scope.rs +++ b/tests/init-scope.rs @@ -1,6 +1,4 @@ #![allow(dead_code)] -#![cfg_attr(USE_RUSTC_FEATURES, feature(lint_reasons))] -#![cfg_attr(USE_RUSTC_FEATURES, feature(raw_ref_op))] use pin_init::*; diff --git a/tests/many_generics.rs b/tests/many_generics.rs index fdc8eb28..dabd2cc3 100644 --- a/tests/many_generics.rs +++ b/tests/many_generics.rs @@ -1,4 +1,3 @@ -#![cfg_attr(USE_RUSTC_FEATURES, feature(lint_reasons))] #![allow(dead_code)] use core::{marker::PhantomPinned, pin::Pin}; diff --git a/tests/ring_buf.rs b/tests/ring_buf.rs index 8d16360d..806a6576 100644 --- a/tests/ring_buf.rs +++ b/tests/ring_buf.rs @@ -1,6 +1,4 @@ #![allow(clippy::undocumented_unsafe_blocks)] -#![cfg_attr(USE_RUSTC_FEATURES, feature(lint_reasons))] -#![cfg_attr(USE_RUSTC_FEATURES, feature(raw_ref_op))] #![cfg_attr(feature = "alloc", feature(allocator_api))] #[cfg(all(not(feature = "std"), feature = "alloc"))] diff --git a/tests/ui.rs b/tests/ui.rs index edaa720a..127a4b5d 100644 --- a/tests/ui.rs +++ b/tests/ui.rs @@ -1,5 +1,3 @@ -#![cfg_attr(USE_RUSTC_FEATURES, feature(lint_reasons))] - #[test] #[cfg_attr(not(UI_TESTS), ignore)] fn ui_compile_fail() { diff --git a/tests/underscore.rs b/tests/underscore.rs index 248c88bf..a55a238a 100644 --- a/tests/underscore.rs +++ b/tests/underscore.rs @@ -1,6 +1,3 @@ -#![cfg_attr(USE_RUSTC_FEATURES, feature(lint_reasons))] -#![cfg_attr(USE_RUSTC_FEATURES, feature(raw_ref_op))] - use pin_init::{init, Init}; pub struct Foo { diff --git a/tests/zeroing.rs b/tests/zeroing.rs index e411e4ba..176f597d 100644 --- a/tests/zeroing.rs +++ b/tests/zeroing.rs @@ -1,6 +1,3 @@ -#![cfg_attr(USE_RUSTC_FEATURES, feature(lint_reasons))] -#![cfg_attr(USE_RUSTC_FEATURES, feature(raw_ref_op))] - use std::marker::PhantomPinned; use pin_init::*;