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

Allow clippy::redundant_pub_crate #284

Merged
merged 1 commit into from
Oct 2, 2020
Merged
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
1 change: 1 addition & 0 deletions pin-project-internal/src/pin_project/derive.rs
Original file line number Diff line number Diff line change
@@ -150,6 +150,7 @@ fn global_allowed_lints() -> TokenStream {
#[allow(explicit_outlives_requirements)] // https://github.com/rust-lang/rust/issues/60993
#[allow(single_use_lifetimes)] // https://github.com/rust-lang/rust/issues/55058
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
}
}

3 changes: 3 additions & 0 deletions tests/expand/tests/expand/default-enum.expanded.rs
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@ enum Enum<T, U> {
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
enum EnumProj<'pin, T, U>
where
Enum<T, U>: 'pin,
@@ -33,6 +34,7 @@ where
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
enum EnumProjRef<'pin, T, U>
where
Enum<T, U>: 'pin,
@@ -51,6 +53,7 @@ where
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
const _: () = {
impl<T, U> Enum<T, U> {
fn project<'pin>(
3 changes: 3 additions & 0 deletions tests/expand/tests/expand/default-struct.expanded.rs
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ struct Struct<T, U> {
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
const _: () = {
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
@@ -20,6 +21,7 @@ const _: () = {
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
struct __StructProjection<'pin, T, U>
where
Struct<T, U>: 'pin,
@@ -33,6 +35,7 @@ const _: () = {
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
struct __StructProjectionRef<'pin, T, U>
where
Struct<T, U>: 'pin,
3 changes: 3 additions & 0 deletions tests/expand/tests/expand/default-tuple_struct.expanded.rs
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ struct TupleStruct<T, U>(#[pin] T, U);
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
const _: () = {
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
@@ -16,6 +17,7 @@ const _: () = {
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
struct __TupleStructProjection<'pin, T, U>(
::pin_project::__private::Pin<&'pin mut (T)>,
&'pin mut (U),
@@ -28,6 +30,7 @@ const _: () = {
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
struct __TupleStructProjectionRef<'pin, T, U>(
::pin_project::__private::Pin<&'pin (T)>,
&'pin (U),
4 changes: 4 additions & 0 deletions tests/expand/tests/expand/naming-enum-all.expanded.rs
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@ enum Enum<T, U> {
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
enum Proj<'pin, T, U>
where
Enum<T, U>: 'pin,
@@ -33,6 +34,7 @@ where
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
enum ProjRef<'pin, T, U>
where
Enum<T, U>: 'pin,
@@ -51,6 +53,7 @@ where
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
enum ProjOwn<T, U> {
Struct {
pinned: ::pin_project::__private::PhantomData<T>,
@@ -66,6 +69,7 @@ enum ProjOwn<T, U> {
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
const _: () = {
impl<T, U> Enum<T, U> {
fn project<'pin>(self: ::pin_project::__private::Pin<&'pin mut Self>) -> Proj<'pin, T, U> {
2 changes: 2 additions & 0 deletions tests/expand/tests/expand/naming-enum-mut.expanded.rs
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@ enum Enum<T, U> {
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
enum Proj<'pin, T, U>
where
Enum<T, U>: 'pin,
@@ -34,6 +35,7 @@ where
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
const _: () = {
impl<T, U> Enum<T, U> {
fn project<'pin>(self: ::pin_project::__private::Pin<&'pin mut Self>) -> Proj<'pin, T, U> {
1 change: 1 addition & 0 deletions tests/expand/tests/expand/naming-enum-none.expanded.rs
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@ enum Enum<T, U> {
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
const _: () = {
impl<T, U> Enum<T, U> {}
struct __Enum<'pin, T, U> {
2 changes: 2 additions & 0 deletions tests/expand/tests/expand/naming-enum-own.expanded.rs
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@ enum Enum<T, U> {
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
enum ProjOwn<T, U> {
Struct {
pinned: ::pin_project::__private::PhantomData<T>,
@@ -31,6 +32,7 @@ enum ProjOwn<T, U> {
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
const _: () = {
impl<T, U> Enum<T, U> {
fn project_replace(
2 changes: 2 additions & 0 deletions tests/expand/tests/expand/naming-enum-ref.expanded.rs
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@ enum Enum<T, U> {
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
enum ProjRef<'pin, T, U>
where
Enum<T, U>: 'pin,
@@ -33,6 +34,7 @@ where
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
const _: () = {
impl<T, U> Enum<T, U> {
fn project_ref<'pin>(
4 changes: 4 additions & 0 deletions tests/expand/tests/expand/naming-struct-all.expanded.rs
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ struct Struct<T, U> {
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
struct Proj<'pin, T, U>
where
Struct<T, U>: 'pin,
@@ -25,6 +26,7 @@ where
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
struct ProjRef<'pin, T, U>
where
Struct<T, U>: 'pin,
@@ -38,6 +40,7 @@ where
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
struct ProjOwn<T, U> {
pinned: ::pin_project::__private::PhantomData<T>,
unpinned: U,
@@ -49,6 +52,7 @@ struct ProjOwn<T, U> {
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
const _: () = {
impl<T, U> Struct<T, U> {
fn project<'pin>(self: ::pin_project::__private::Pin<&'pin mut Self>) -> Proj<'pin, T, U> {
3 changes: 3 additions & 0 deletions tests/expand/tests/expand/naming-struct-mut.expanded.rs
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ struct Struct<T, U> {
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
struct Proj<'pin, T, U>
where
Struct<T, U>: 'pin,
@@ -26,13 +27,15 @@ where
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
const _: () = {
#[allow(dead_code)]
#[allow(clippy::type_repetition_in_bounds)]
#[allow(box_pointers)]
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
struct __StructProjectionRef<'pin, T, U>
where
Struct<T, U>: 'pin,
3 changes: 3 additions & 0 deletions tests/expand/tests/expand/naming-struct-none.expanded.rs
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ struct Struct<T, U> {
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
const _: () = {
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
@@ -20,6 +21,7 @@ const _: () = {
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
struct __StructProjection<'pin, T, U>
where
Struct<T, U>: 'pin,
@@ -33,6 +35,7 @@ const _: () = {
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
struct __StructProjectionRef<'pin, T, U>
where
Struct<T, U>: 'pin,
4 changes: 4 additions & 0 deletions tests/expand/tests/expand/naming-struct-own.expanded.rs
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@ struct Struct<T, U> {
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
struct ProjOwn<T, U> {
pinned: ::pin_project::__private::PhantomData<T>,
unpinned: U,
@@ -22,6 +23,7 @@ struct ProjOwn<T, U> {
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
const _: () = {
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
@@ -30,6 +32,7 @@ const _: () = {
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
struct __StructProjection<'pin, T, U>
where
Struct<T, U>: 'pin,
@@ -43,6 +46,7 @@ const _: () = {
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
struct __StructProjectionRef<'pin, T, U>
where
Struct<T, U>: 'pin,
3 changes: 3 additions & 0 deletions tests/expand/tests/expand/naming-struct-ref.expanded.rs
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@ struct Struct<T, U> {
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
struct ProjRef<'pin, T, U>
where
Struct<T, U>: 'pin,
@@ -25,6 +26,7 @@ where
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
const _: () = {
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
@@ -33,6 +35,7 @@ const _: () = {
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
struct __StructProjection<'pin, T, U>
where
Struct<T, U>: 'pin,
4 changes: 4 additions & 0 deletions tests/expand/tests/expand/naming-tuple_struct-all.expanded.rs
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ struct TupleStruct<T, U>(#[pin] T, U);
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
struct Proj<'pin, T, U>(::pin_project::__private::Pin<&'pin mut (T)>, &'pin mut (U))
where
TupleStruct<T, U>: 'pin;
@@ -17,6 +18,7 @@ where
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
struct ProjRef<'pin, T, U>(::pin_project::__private::Pin<&'pin (T)>, &'pin (U))
where
TupleStruct<T, U>: 'pin;
@@ -26,6 +28,7 @@ where
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
struct ProjOwn<T, U>(::pin_project::__private::PhantomData<T>, U);
#[doc(hidden)]
#[allow(non_upper_case_globals)]
@@ -34,6 +37,7 @@ struct ProjOwn<T, U>(::pin_project::__private::PhantomData<T>, U);
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
const _: () = {
impl<T, U> TupleStruct<T, U> {
fn project<'pin>(self: ::pin_project::__private::Pin<&'pin mut Self>) -> Proj<'pin, T, U> {
3 changes: 3 additions & 0 deletions tests/expand/tests/expand/naming-tuple_struct-mut.expanded.rs
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ struct TupleStruct<T, U>(#[pin] T, U);
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
struct Proj<'pin, T, U>(::pin_project::__private::Pin<&'pin mut (T)>, &'pin mut (U))
where
TupleStruct<T, U>: 'pin;
@@ -18,13 +19,15 @@ where
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
const _: () = {
#[allow(dead_code)]
#[allow(clippy::type_repetition_in_bounds)]
#[allow(box_pointers)]
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
struct __TupleStructProjectionRef<'pin, T, U>(
::pin_project::__private::Pin<&'pin (T)>,
&'pin (U),
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ struct TupleStruct<T, U>(#[pin] T, U);
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
const _: () = {
#[allow(dead_code)]
#[allow(clippy::mut_mut)]
@@ -16,6 +17,7 @@ const _: () = {
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
struct __TupleStructProjection<'pin, T, U>(
::pin_project::__private::Pin<&'pin mut (T)>,
&'pin mut (U),
@@ -28,6 +30,7 @@ const _: () = {
#[allow(explicit_outlives_requirements)]
#[allow(single_use_lifetimes)]
#[allow(clippy::pattern_type_mismatch)]
#[allow(clippy::redundant_pub_crate)]
struct __TupleStructProjectionRef<'pin, T, U>(
::pin_project::__private::Pin<&'pin (T)>,
&'pin (U),
Loading