diff --git a/rustc-flags b/rustc-flags index 05abeb6..3d617e3 100644 --- a/rustc-flags +++ b/rustc-flags @@ -1,4 +1,5 @@ --deny=absolute_paths_not_starting_with_crate +--deny=dead_code --deny=elided_lifetimes_in_paths --deny=explicit_outlives_requirements --deny=keyword_idents @@ -25,6 +26,5 @@ --deny=unused_lifetimes --deny=unused_macro_rules --deny=unused_qualifications ---deny=unused_tuple_struct_fields --deny=variant_size_differences --deny=warnings diff --git a/treeedbgen-souffle-c/tests/main.rs b/treeedbgen-souffle-c/tests/main.rs index 2192366..b3af339 100644 --- a/treeedbgen-souffle-c/tests/main.rs +++ b/treeedbgen-souffle-c/tests/main.rs @@ -5,7 +5,7 @@ use predicates::prelude::*; use tempfile::NamedTempFile; #[test] -fn gen() -> Result<(), Box> { +fn test_gen() -> Result<(), Box> { let mut cmd = Command::cargo_bin("treeedbgen-souffle-c")?; let tmp = NamedTempFile::new()?; cmd.arg("-o").arg(tmp.path()); diff --git a/treeedbgen-souffle-csharp/tests/main.rs b/treeedbgen-souffle-csharp/tests/main.rs index 3a735b4..dbdae7c 100644 --- a/treeedbgen-souffle-csharp/tests/main.rs +++ b/treeedbgen-souffle-csharp/tests/main.rs @@ -5,7 +5,7 @@ use predicates::prelude::*; use tempfile::NamedTempFile; #[test] -fn gen() -> Result<(), Box> { +fn test_gen() -> Result<(), Box> { let mut cmd = Command::cargo_bin("treeedbgen-souffle-csharp")?; let tmp = NamedTempFile::new()?; cmd.arg("-o").arg(tmp.path()); diff --git a/treeedbgen-souffle-java/tests/main.rs b/treeedbgen-souffle-java/tests/main.rs index 9ebcf0b..463579c 100644 --- a/treeedbgen-souffle-java/tests/main.rs +++ b/treeedbgen-souffle-java/tests/main.rs @@ -5,7 +5,7 @@ use predicates::prelude::*; use tempfile::NamedTempFile; #[test] -fn gen() -> Result<(), Box> { +fn test_gen() -> Result<(), Box> { let mut cmd = Command::cargo_bin("treeedbgen-souffle-java")?; let tmp = NamedTempFile::new()?; cmd.arg("-o").arg(tmp.path()); diff --git a/treeedbgen-souffle-javascript/tests/main.rs b/treeedbgen-souffle-javascript/tests/main.rs index fda84f2..f29a35d 100644 --- a/treeedbgen-souffle-javascript/tests/main.rs +++ b/treeedbgen-souffle-javascript/tests/main.rs @@ -5,7 +5,7 @@ use predicates::prelude::*; use tempfile::NamedTempFile; #[test] -fn gen() -> Result<(), Box> { +fn test_gen() -> Result<(), Box> { let mut cmd = Command::cargo_bin("treeedbgen-souffle-javascript")?; let tmp = NamedTempFile::new()?; cmd.arg("-o").arg(tmp.path()); diff --git a/treeedbgen-souffle-rust/tests/main.rs b/treeedbgen-souffle-rust/tests/main.rs index b60b4d3..8b7b314 100644 --- a/treeedbgen-souffle-rust/tests/main.rs +++ b/treeedbgen-souffle-rust/tests/main.rs @@ -5,7 +5,7 @@ use predicates::prelude::*; use tempfile::NamedTempFile; #[test] -fn gen() -> Result<(), Box> { +fn test_gen() -> Result<(), Box> { let mut cmd = Command::cargo_bin("treeedbgen-souffle-rust")?; let tmp = NamedTempFile::new()?; cmd.arg("-o").arg(tmp.path()); diff --git a/treeedbgen-souffle-souffle/tests/main.rs b/treeedbgen-souffle-souffle/tests/main.rs index 66a11e4..5bc435b 100644 --- a/treeedbgen-souffle-souffle/tests/main.rs +++ b/treeedbgen-souffle-souffle/tests/main.rs @@ -5,7 +5,7 @@ use predicates::prelude::*; use tempfile::NamedTempFile; #[test] -fn gen() -> Result<(), Box> { +fn test_gen() -> Result<(), Box> { let mut cmd = Command::cargo_bin("treeedbgen-souffle-souffle")?; let tmp = NamedTempFile::new()?; cmd.arg("-o").arg(tmp.path()); diff --git a/treeedbgen-souffle-swift/tests/main.rs b/treeedbgen-souffle-swift/tests/main.rs index 4377ad0..69e4cdc 100644 --- a/treeedbgen-souffle-swift/tests/main.rs +++ b/treeedbgen-souffle-swift/tests/main.rs @@ -5,7 +5,7 @@ use predicates::prelude::*; use tempfile::NamedTempFile; #[test] -fn gen() -> Result<(), Box> { +fn test_gen() -> Result<(), Box> { let mut cmd = Command::cargo_bin("treeedbgen-souffle-swift")?; let tmp = NamedTempFile::new()?; cmd.arg("-o").arg(tmp.path()); diff --git a/treeedbgen-souffle/src/cli.rs b/treeedbgen-souffle/src/cli.rs index 44ca939..5e2e832 100644 --- a/treeedbgen-souffle/src/cli.rs +++ b/treeedbgen-souffle/src/cli.rs @@ -27,12 +27,12 @@ pub fn main(node_types: &str) -> Result<()> { if let Some(path) = args.output { let mut file = std::fs::File::create(&path) .with_context(|| format!("Failed to write to file {}", path))?; - super::gen(&config, &mut file, node_types)?; + super::r#gen(&config, &mut file, node_types)?; } else { // https://nnethercote.github.io/perf-book/io.html#locking let stdout = std::io::stdout(); let mut lock = stdout.lock(); - super::gen(&config, &mut lock, node_types)?; + super::r#gen(&config, &mut lock, node_types)?; } Ok(()) } diff --git a/treeedbgen-souffle/src/gen.rs b/treeedbgen-souffle/src/gen.rs index 4148786..c146ab1 100644 --- a/treeedbgen-souffle/src/gen.rs +++ b/treeedbgen-souffle/src/gen.rs @@ -305,7 +305,7 @@ fn declare_child(config: &PrivGenConfig, w: &mut impl Write) -> Result<(), GenEr Ok(()) } -pub fn gen( +pub fn r#gen( config: &GenConfig, w: &mut impl Write, node_types_json_str: &str, diff --git a/treeedbgen-souffle/src/lib.rs b/treeedbgen-souffle/src/lib.rs index 48dd177..9913ceb 100644 --- a/treeedbgen-souffle/src/lib.rs +++ b/treeedbgen-souffle/src/lib.rs @@ -1,5 +1,5 @@ -mod gen; -pub use gen::*; +mod r#gen; +pub use r#gen::*; #[cfg(feature = "cli")] pub mod cli;