Skip to content

Commit

Permalink
Cleanup allow annotations on derive output
Browse files Browse the repository at this point in the history
Fixes #19
  • Loading branch information
danburkert committed Jul 11, 2017
1 parent f0f41df commit eb15ca8
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions prost-derive/src/prost-derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,20 +107,15 @@ fn try_message(input: TokenStream) -> Result<TokenStream> {
quote!()
} else {
quote! {
#[allow(dead_code)]
impl #ident {
#(#methods)*
}
}
};

let expanded = quote! {
#[allow(
non_upper_case_globals,
unused_attributes,
unused_imports,
unused_qualifications,
unused_variables
)]
#[allow(non_upper_case_globals, unused_attributes)]
const #dummy_const: () = {

extern crate prost as _prost;
Expand Down Expand Up @@ -209,7 +204,7 @@ pub fn enumeration(input: TokenStream) -> TokenStream {
let from_i32_doc = format!("Converts an `i32` to a `{}`, or `None` if `value` is not a valid variant.", ident);

let expanded = quote! {
#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)]
#[allow(non_upper_case_globals, unused_attributes)]
const #dummy_const: () = {
extern crate bytes as _bytes;
extern crate prost as _prost;
Expand Down Expand Up @@ -325,13 +320,7 @@ fn try_oneof(input: TokenStream) -> Result<TokenStream> {
});

let expanded = quote! {
#[allow(
non_upper_case_globals,
unused_attributes,
unused_imports,
unused_qualifications,
unused_variables
)]
#[allow(non_upper_case_globals, unused_attributes)]
const #dummy_const: () = {
extern crate bytes as _bytes;
extern crate prost as _prost;
Expand Down

0 comments on commit eb15ca8

Please sign in to comment.