File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -114,6 +114,9 @@ jobs:
114114 cd ./tests/smoke-test
115115 cargo +beta clippy
116116
117+ - name : Tests
118+ run : cargo test
119+
117120 embedded :
118121 name : Build (embedded)
119122 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -481,7 +481,8 @@ macro_rules! bitflags {
481481 non_upper_case_globals,
482482 clippy:: assign_op_pattern,
483483 clippy:: indexing_slicing,
484- clippy:: same_name_method
484+ clippy:: same_name_method,
485+ clippy:: iter_without_into_iter,
485486 ) ]
486487 const _: ( ) = {
487488 // Declared in a "hidden" scope that can't be reached directly
@@ -553,7 +554,8 @@ macro_rules! bitflags {
553554 unused_mut,
554555 unused_imports,
555556 non_upper_case_globals,
556- clippy:: assign_op_pattern
557+ clippy:: assign_op_pattern,
558+ clippy:: iter_without_into_iter,
557559 ) ]
558560 const _: ( ) = {
559561 __impl_public_bitflags! {
Original file line number Diff line number Diff line change 1+ #![ allow( clippy:: let_unit_value) ]
2+
13#[ macro_use]
24extern crate bitflags;
35
Original file line number Diff line number Diff line change 1+ /*!
2+ Crate-level doc
3+ */
4+
5+ #![ deny( missing_docs) ]
6+
7+ use bitflags:: bitflags;
8+
9+ bitflags ! {
10+ #[ allow( missing_docs) ]
11+ pub struct MyFlags : u32 {
12+ #[ allow( missing_docs) ]
13+ const A = 1 ;
14+ #[ allow( missing_docs) ]
15+ const B = 2 ;
16+ }
17+ }
18+
19+ fn main ( ) { }
Original file line number Diff line number Diff line change 1+ #![ deny( clippy:: pedantic) ]
2+
3+ use bitflags:: bitflags;
4+
5+ bitflags ! {
6+ pub struct MyFlags : u32 {
7+ const A = 1 ;
8+ const B = 2 ;
9+ }
10+ }
11+
12+ fn main ( ) { }
Original file line number Diff line number Diff line change @@ -11,6 +11,13 @@ fn fail() {
1111
1212#[ test]
1313fn pass ( ) {
14+ // If `clippy` is available, then use it
15+ if std:: process:: Command :: new ( "clippy-driver" ) . arg ( "--version" ) . output ( ) . is_ok ( ) {
16+ println ! ( "Using `clippy`" ) ;
17+
18+ std:: env:: set_var ( "RUSTC_WORKSPACE_WRAPPER" , "clippy-driver" ) ;
19+ }
20+
1421 let t = trybuild:: TestCases :: new ( ) ;
1522 t. pass ( "tests/compile-pass/**/*.rs" ) ;
1623}
You can’t perform that action at this time.
0 commit comments