Suppress some warnings

This commit is contained in:
Joeri van Ruth 2017-09-15 15:04:46 +02:00
parent d4669c1226
commit 517acc3543
3 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,3 @@
#![allow(clippy)]
#![cfg_attr(feature = "cargo-clippy", allow(clippy))]
grammar(scale: i32);

View File

@ -131,6 +131,7 @@ impl<'codegen, 'grammar, W: Write, C> CodeGenerator<'codegen, 'grammar, W, C> {
}
}
rust!(self.out, "#[allow(dead_code)]");
try!(self.out.write_pub_fn_header(self.grammar,
format!("parse_{}", self.user_start_symbol),
type_parameters,

View File

@ -202,7 +202,9 @@ impl<W:Write> RustWrite<W> {
}
pub fn write_standard_uses(&mut self, prefix: &str) -> io::Result<()> {
// stuff that we plan to use
// Stuff that we plan to use.
// Occasionally we happen to not use it after all, hence the allow.
rust!(self, "#[allow(unused_extern_crates)]");
rust!(self, "extern crate lalrpop_util as {}lalrpop_util;",
prefix);