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
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
1 change: 1 addition & 0 deletions pin-project-internal/src/pin_project/derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
}
}

Expand Down
3 changes: 3 additions & 0 deletions tests/expand/tests/expand/default-enum.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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>(
Expand Down
3 changes: 3 additions & 0 deletions tests/expand/tests/expand/default-struct.expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand All @@ -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,
Expand All @@ -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,
Expand Down
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
Expand Up @@ -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)]
Expand All @@ -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),
Expand All @@ -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),
Expand Down
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
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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>,
Expand All @@ -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> {
Expand Down
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
Expand Up @@ -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,
Expand All @@ -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> {
Expand Down
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
Expand Up @@ -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> {
Expand Down
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
Expand Up @@ -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>,
Expand All @@ -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(
Expand Down
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
Expand Up @@ -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,
Expand All @@ -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>(
Expand Down
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
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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> {
Expand Down
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
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
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
Expand Up @@ -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)]
Expand All @@ -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,
Expand All @@ -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,
Expand Down
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
Expand Up @@ -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,
Expand All @@ -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)]
Expand All @@ -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,
Expand All @@ -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,
Expand Down
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
Expand Up @@ -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,
Expand All @@ -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)]
Expand All @@ -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,
Expand Down
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
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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)]
Expand All @@ -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> {
Expand Down
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
Expand Up @@ -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;
Expand All @@ -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),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand All @@ -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),
Expand All @@ -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),
Expand Down
Loading