Skip to content

Commit

Permalink
Fix non-local impl nightly warning with allow(non_local_definitions) (
Browse files Browse the repository at this point in the history
  • Loading branch information
maackle authored Nov 21, 2024
1 parent 46db80d commit d179a50
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions proptest-derive/src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ impl Impl {
// The double-curly-braces are not strictly required, but allow the expression to be
// annotated with an attribute.
let q = quote! {
#[allow(non_local_definitions)]
#[allow(non_upper_case_globals)]
#[allow(clippy::arc_with_non_send_sync)]
const _: () = {
Expand Down
3 changes: 3 additions & 0 deletions proptest-derive/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ test! {
#[derive(Debug)]
struct MyUnitStruct;
} expands to {
#[allow(non_local_definitions)]
#[allow(non_upper_case_globals)]
#[allow(clippy::arc_with_non_send_sync)]
const _: () = {
Expand All @@ -99,6 +100,7 @@ test! {
#[derive(Debug)]
struct MyTupleUnitStruct();
} expands to {
#[allow(non_local_definitions)]
#[allow(non_upper_case_globals)]
#[allow(clippy::arc_with_non_send_sync)]
const _: () = {
Expand All @@ -120,6 +122,7 @@ test! {
#[derive(Debug)]
struct MyNamedUnitStruct {}
} expands to {
#[allow(non_local_definitions)]
#[allow(non_upper_case_globals)]
#[allow(clippy::arc_with_non_send_sync)]
const _: () = {
Expand Down

0 comments on commit d179a50

Please sign in to comment.