Skip to content

Commit 6fe7d39

Browse files
author
Hui Zhu
authored
Merge pull request #210 from Tim-Zhang/allow-clippy-for-gencode
Compiler: Ignore clippy warnings in gencode and release ttrpc-compiler:v0.6.2
2 parents a205575 + f4bac5b commit 6fe7d39

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

compiler/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ttrpc-compiler"
3-
version = "0.6.1"
3+
version = "0.6.2"
44
edition = "2018"
55
authors = ["The AntFin Kata Team <[email protected]>"]
66
license = "Apache-2.0"

compiler/src/codegen.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -639,12 +639,9 @@ fn write_generated_common(w: &mut CodeWriter) {
639639
w.write_line("// @generated");
640640

641641
w.write_line("");
642-
w.comment("https://github.com/Manishearth/rust-clippy/issues/702");
642+
w.write_line("#![cfg_attr(rustfmt, rustfmt_skip)]");
643643
w.write_line("#![allow(unknown_lints)]");
644644
w.write_line("#![allow(clipto_camel_casepy)]");
645-
w.write_line("");
646-
w.write_line("#![cfg_attr(rustfmt, rustfmt_skip)]");
647-
w.write_line("");
648645
w.write_line("#![allow(box_pointers)]");
649646
w.write_line("#![allow(dead_code)]");
650647
w.write_line("#![allow(missing_docs)]");
@@ -655,6 +652,7 @@ fn write_generated_common(w: &mut CodeWriter) {
655652
w.write_line("#![allow(unsafe_code)]");
656653
w.write_line("#![allow(unused_imports)]");
657654
w.write_line("#![allow(unused_results)]");
655+
w.write_line("#![allow(clippy::all)]");
658656
}
659657

660658
fn gen_file(

0 commit comments

Comments
 (0)