Skip to content

Commit d4981a5

Browse files
committed
compiler: Ignore all clippy warnings in generated code
Fixes: #193 Signed-off-by: Tim Zhang <[email protected]>
1 parent f669c05 commit d4981a5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

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)