Skip to content

Commit

Permalink
Merge #57
Browse files Browse the repository at this point in the history
57: Apply #[allow(dead_code)] to generated types r=taiki-e a=Aaron1011

This prevents users from seing pointless, unsuppressible warnings in
their build

Co-authored-by: Aaron Hill <aa1ronham@gmail.com>
  • Loading branch information
bors[bot] and Aaron1011 authored Sep 1, 2019
2 parents cce010f + 99aa28a commit 0873628
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions pin-project-internal/src/pin_project/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ pub(super) fn parse(cx: &mut Context, mut item: ItemEnum) -> Result<TokenStream>
let (impl_generics, ty_generics, where_clause) = item.generics.split_for_impl();

let mut proj_items = quote! {
#[allow(dead_code)]
enum #proj_ident #proj_generics #where_clause { #(#proj_variants,)* }
};
proj_items.extend(quote! {
Expand Down
1 change: 1 addition & 0 deletions pin-project-internal/src/pin_project/structs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ pub(super) fn parse(cx: &mut Context, mut item: ItemStruct) -> Result<TokenStrea
let (impl_generics, ty_generics, where_clause) = item.generics.split_for_impl();

let mut proj_items = quote! {
#[allow(dead_code)]
struct #proj_ident #proj_generics #where_clause #proj_fields
};
proj_items.extend(quote! {
Expand Down

0 comments on commit 0873628

Please sign in to comment.