Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump MSRV to 1.37 #292

Merged
merged 1 commit into from
Oct 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ jobs:
rust:
# This is the minimum supported Rust version of this crate.
# When updating this, the reminder to update the minimum supported Rust version in README.md.
- 1.34.0
- 1.36.0
- 1.37.0
- stable
- beta
Expand All @@ -52,12 +50,7 @@ jobs:
if: matrix.rust == 'nightly'
run: |
rustup target add thumbv7m-none-eabi
- name: cargo test --tests
if: matrix.rust == '1.34.0' || matrix.rust == '1.36.0'
run: |
cargo test --all --all-features --exclude expandtest --tests
- name: cargo test
if: matrix.rust != '1.34.0' && matrix.rust != '1.36.0'
run: |
cargo test --all --all-features --exclude expandtest
- name: cargo check (no-std)
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ This project adheres to [Semantic Versioning](https://semver.org).

## [Unreleased]

* [Raise the minimum supported Rust version of this crate from Rust 1.34 to Rust 1.37.](https://github.com/taiki-e/pin-project/pull/292)

* [Suppress `clippy::redundant_pub_crate` lint in generated code.](https://github.com/taiki-e/pin-project/pull/284)

## [1.0.0-alpha.1] - 2020-09-22
Expand Down Expand Up @@ -206,7 +208,7 @@ See also [tracking issue for 1.0 release](https://github.com/taiki-e/pin-project
}
```

*[Note: This raises the minimum supported Rust version of this crate from rustc 1.33 to rustc 1.34.](https://github.com/taiki-e/pin-project/pull/219#pullrequestreview-408644187)*
*[Note: This raises the minimum supported Rust version of this crate from Rust 1.33 to Rust 1.34.](https://github.com/taiki-e/pin-project/pull/219#pullrequestreview-408644187)*

* [Fixed an issue where duplicate `#[project]` attributes were ignored.][218]

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
[docs-url]: https://docs.rs/pin-project
[license-badge]: https://img.shields.io/badge/license-Apache--2.0%20OR%20MIT-blue.svg
[license]: #license
[rustc-badge]: https://img.shields.io/badge/rustc-1.34+-lightgray.svg
[rustc-url]: https://blog.rust-lang.org/2019/04/11/Rust-1.34.0.html
[rustc-badge]: https://img.shields.io/badge/rustc-1.37+-lightgray.svg
[rustc-url]: https://blog.rust-lang.org/2019/08/15/Rust-1.37.0.html

A crate for safe and ergonomic [pin-projection].

Expand All @@ -25,7 +25,7 @@ Add this to your `Cargo.toml`:
pin-project = "1.0.0-alpha.1"
```

The current pin-project requires Rust 1.34 or later.
The current pin-project requires Rust 1.37 or later.

## Examples

Expand Down
1 change: 0 additions & 1 deletion examples/enum-default-expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ where
Unpinned(&'pin mut (U)),
}

#[doc(hidden)]
#[allow(non_upper_case_globals)]
#[allow(clippy::used_underscore_binding)]
#[allow(box_pointers)]
Expand Down
1 change: 0 additions & 1 deletion examples/not_unpin-expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ pub struct Struct<T, U> {
unpinned: U,
}

#[doc(hidden)]
#[allow(non_upper_case_globals)]
#[allow(clippy::used_underscore_binding)]
#[allow(box_pointers)]
Expand Down
1 change: 0 additions & 1 deletion examples/pinned_drop-expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ pub struct Struct<'a, T> {
field: T,
}

#[doc(hidden)]
#[allow(non_upper_case_globals)]
#[allow(clippy::used_underscore_binding)]
#[allow(box_pointers)]
Expand Down
1 change: 0 additions & 1 deletion examples/project_replace-expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ struct Struct<T, U> {
unpinned: U,
}

#[doc(hidden)]
#[allow(non_upper_case_globals)]
#[allow(clippy::used_underscore_binding)]
#[allow(box_pointers)]
Expand Down
1 change: 0 additions & 1 deletion examples/struct-default-expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ struct Struct<T, U> {
unpinned: U,
}

#[doc(hidden)]
#[allow(non_upper_case_globals)]
#[allow(clippy::used_underscore_binding)]
#[allow(box_pointers)]
Expand Down
1 change: 0 additions & 1 deletion examples/unsafe_unpin-expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ pub struct Struct<T, U> {
unpinned: U,
}

#[doc(hidden)]
#[allow(non_upper_case_globals)]
#[allow(clippy::used_underscore_binding)]
#[allow(box_pointers)]
Expand Down
50 changes: 0 additions & 50 deletions pin-project-internal/build.rs

This file was deleted.

13 changes: 2 additions & 11 deletions pin-project-internal/src/pin_project/derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,7 @@ impl GenerateTokens {

let unpin_impl = make_unpin_impl(cx);
let drop_impl = make_drop_impl(cx);

let mut allowed_lints = global_allowed_lints();
let dummy_const = if cfg!(underscore_consts) {
format_ident!("_")
} else {
// for Rust 1.34 - 1.36
allowed_lints.extend(quote!(#[allow(non_upper_case_globals)]));
format_ident!("__SCOPE_{}", cx.orig.ident)
};
let allowed_lints = global_allowed_lints();

tokens.extend(quote! {
// All items except projected types are generated inside a `const` scope.
Expand All @@ -90,10 +82,9 @@ impl GenerateTokens {
// * https://github.com/rust-lang/rust/issues/63281
// * https://github.com/taiki-e/pin-project/pull/53#issuecomment-525906867
// * https://github.com/taiki-e/pin-project/pull/70
#[doc(hidden)] // for Rust 1.34 - 1.41
#allowed_lints
#[allow(clippy::used_underscore_binding)]
const #dummy_const: () = {
const _: () = {
#scoped
#unpin_impl
#drop_impl
Expand Down
1 change: 0 additions & 1 deletion tests/expand/tests/expand/default-enum.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ where
Tuple(::pin_project::__private::Pin<&'pin (T)>, &'pin (U)),
Unit,
}
#[doc(hidden)]
#[allow(box_pointers)]
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
Expand Down
1 change: 0 additions & 1 deletion tests/expand/tests/expand/default-struct.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ struct Struct<T, U> {
pinned: T,
unpinned: U,
}
#[doc(hidden)]
#[allow(box_pointers)]
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
Expand Down
1 change: 0 additions & 1 deletion tests/expand/tests/expand/default-tuple_struct.expanded.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use pin_project::pin_project;
#[pin(__private())]
struct TupleStruct<T, U>(#[pin] T, U);
#[doc(hidden)]
#[allow(box_pointers)]
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
Expand Down
1 change: 0 additions & 1 deletion tests/expand/tests/expand/multifields-enum.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ enum EnumProjOwn<T, U> {
),
Unit,
}
#[doc(hidden)]
#[allow(box_pointers)]
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
Expand Down
1 change: 0 additions & 1 deletion tests/expand/tests/expand/multifields-struct.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ struct Struct<T, U> {
unpinned1: U,
unpinned2: U,
}
#[doc(hidden)]
#[allow(box_pointers)]
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use pin_project::pin_project;
#[pin(__private(project_replace))]
struct TupleStruct<T, U>(#[pin] T, #[pin] T, U, U);
#[doc(hidden)]
#[allow(box_pointers)]
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
Expand Down
1 change: 0 additions & 1 deletion tests/expand/tests/expand/naming-enum-all.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ enum ProjOwn<T, U> {
Tuple(::pin_project::__private::PhantomData<T>, U),
Unit,
}
#[doc(hidden)]
#[allow(box_pointers)]
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
Expand Down
1 change: 0 additions & 1 deletion tests/expand/tests/expand/naming-enum-mut.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ where
Tuple(::pin_project::__private::Pin<&'pin mut (T)>, &'pin mut (U)),
Unit,
}
#[doc(hidden)]
#[allow(box_pointers)]
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
Expand Down
1 change: 0 additions & 1 deletion tests/expand/tests/expand/naming-enum-none.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ enum Enum<T, U> {
Tuple(#[pin] T, U),
Unit,
}
#[doc(hidden)]
#[allow(box_pointers)]
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
Expand Down
1 change: 0 additions & 1 deletion tests/expand/tests/expand/naming-enum-own.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ enum ProjOwn<T, U> {
Tuple(::pin_project::__private::PhantomData<T>, U),
Unit,
}
#[doc(hidden)]
#[allow(box_pointers)]
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
Expand Down
1 change: 0 additions & 1 deletion tests/expand/tests/expand/naming-enum-ref.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ where
Tuple(::pin_project::__private::Pin<&'pin (T)>, &'pin (U)),
Unit,
}
#[doc(hidden)]
#[allow(box_pointers)]
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
Expand Down
1 change: 0 additions & 1 deletion tests/expand/tests/expand/naming-struct-all.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ struct ProjOwn<T, U> {
pinned: ::pin_project::__private::PhantomData<T>,
unpinned: U,
}
#[doc(hidden)]
#[allow(box_pointers)]
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
Expand Down
1 change: 0 additions & 1 deletion tests/expand/tests/expand/naming-struct-mut.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ where
pinned: ::pin_project::__private::Pin<&'pin mut (T)>,
unpinned: &'pin mut (U),
}
#[doc(hidden)]
#[allow(box_pointers)]
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
Expand Down
1 change: 0 additions & 1 deletion tests/expand/tests/expand/naming-struct-none.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ struct Struct<T, U> {
pinned: T,
unpinned: U,
}
#[doc(hidden)]
#[allow(box_pointers)]
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
Expand Down
1 change: 0 additions & 1 deletion tests/expand/tests/expand/naming-struct-own.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ struct ProjOwn<T, U> {
pinned: ::pin_project::__private::PhantomData<T>,
unpinned: U,
}
#[doc(hidden)]
#[allow(box_pointers)]
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
Expand Down
1 change: 0 additions & 1 deletion tests/expand/tests/expand/naming-struct-ref.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ where
pinned: ::pin_project::__private::Pin<&'pin (T)>,
unpinned: &'pin (U),
}
#[doc(hidden)]
#[allow(box_pointers)]
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ where
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
struct ProjOwn<T, U>(::pin_project::__private::PhantomData<T>, U);
#[doc(hidden)]
#[allow(box_pointers)]
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ struct TupleStruct<T, U>(#[pin] T, U);
struct Proj<'pin, T, U>(::pin_project::__private::Pin<&'pin mut (T)>, &'pin mut (U))
where
TupleStruct<T, U>: 'pin;
#[doc(hidden)]
#[allow(box_pointers)]
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use pin_project::pin_project;
#[pin(__private())]
struct TupleStruct<T, U>(#[pin] T, U);
#[doc(hidden)]
#[allow(box_pointers)]
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ struct TupleStruct<T, U>(#[pin] T, U);
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
struct ProjOwn<T, U>(::pin_project::__private::PhantomData<T>, U);
#[doc(hidden)]
#[allow(box_pointers)]
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ struct TupleStruct<T, U>(#[pin] T, U);
struct ProjRef<'pin, T, U>(::pin_project::__private::Pin<&'pin (T)>, &'pin (U))
where
TupleStruct<T, U>: 'pin;
#[doc(hidden)]
#[allow(box_pointers)]
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
Expand Down
1 change: 0 additions & 1 deletion tests/expand/tests/expand/not_unpin-enum.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ where
Tuple(::pin_project::__private::Pin<&'pin (T)>, &'pin (U)),
Unit,
}
#[doc(hidden)]
#[allow(box_pointers)]
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
Expand Down
1 change: 0 additions & 1 deletion tests/expand/tests/expand/not_unpin-struct.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ struct Struct<T, U> {
pinned: T,
unpinned: U,
}
#[doc(hidden)]
#[allow(box_pointers)]
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use pin_project::pin_project;
# [pin (__private (! Unpin))]
struct TupleStruct<T, U>(#[pin] T, U);
#[doc(hidden)]
#[allow(box_pointers)]
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
Expand Down
1 change: 0 additions & 1 deletion tests/expand/tests/expand/pinned_drop-enum.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ where
Tuple(::pin_project::__private::Pin<&'pin (T)>, &'pin (U)),
Unit,
}
#[doc(hidden)]
#[allow(box_pointers)]
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
Expand Down
1 change: 0 additions & 1 deletion tests/expand/tests/expand/pinned_drop-struct.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ struct Struct<T, U> {
pinned: T,
unpinned: U,
}
#[doc(hidden)]
#[allow(box_pointers)]
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
Expand Down
Loading