File tree Expand file tree Collapse file tree 2 files changed +54
-5
lines changed Expand file tree Collapse file tree 2 files changed +54
-5
lines changed Original file line number Diff line number Diff line change @@ -590,7 +590,9 @@ macro_rules! bitflags {
590
590
unused_mut,
591
591
unused_imports,
592
592
non_upper_case_globals,
593
- clippy:: assign_op_pattern
593
+ clippy:: assign_op_pattern,
594
+ clippy:: indexing_slicing,
595
+ clippy:: same_name_method
594
596
) ]
595
597
const _: ( ) = {
596
598
// Declared in a "hidden" scope that can't be reached directly
Original file line number Diff line number Diff line change 1
- #![ deny( warnings) ]
1
+ #![ allow( unknown_lints) ]
2
+ #![ deny( clippy:: all, clippy:: pedantic, clippy:: restriction) ]
3
+ #![ allow( clippy:: blanket_clippy_restriction_lints) ]
4
+ // deny all rustc's built-in lints
5
+ #![ deny(
6
+ warnings,
7
+ future_incompatible,
8
+ let_underscore,
9
+ nonstandard_style,
10
+ rust_2018_compatibility,
11
+ rust_2018_idioms,
12
+ rust_2021_compatibility,
13
+ unused
14
+ ) ]
15
+ // deny additional allow by default from rustc
16
+ #![ deny(
17
+ deprecated_in_future,
18
+ ffi_unwind_calls,
19
+ macro_use_extern_crate,
20
+ meta_variable_misuse,
21
+ missing_abi,
22
+ missing_copy_implementations,
23
+ missing_debug_implementations,
24
+ missing_docs,
25
+ non_ascii_idents,
26
+ noop_method_call,
27
+ single_use_lifetimes,
28
+ trivial_casts,
29
+ trivial_numeric_casts,
30
+ unreachable_pub,
31
+ unsafe_code,
32
+ unsafe_op_in_unsafe_fn,
33
+ unused_crate_dependencies,
34
+ unused_import_braces,
35
+ unused_lifetimes,
36
+ unused_qualifications,
37
+ unused_results,
38
+ unused_tuple_struct_fields,
39
+ variant_size_differences
40
+ ) ]
41
+
42
+ //! An example file for smoke tests
2
43
3
44
use bitflags:: bitflags;
4
45
5
46
bitflags ! {
6
47
#[ derive( Debug ) ]
48
+ /// Example Flags
7
49
pub struct Flags : u32 {
8
- const A = 0b00000001 ;
9
- const B = 0b00000010 ;
10
- const C = 0b00000100 ;
50
+ /// A
51
+ const A = 0b0000_0001 ;
52
+ /// B
53
+ const B = 0b0000_0010 ;
54
+ /// C
55
+ const C = 0b0000_0100 ;
56
+ /// ABC
11
57
const ABC = Flags :: A . bits( ) | Flags :: B . bits( ) | Flags :: C . bits( ) ;
12
58
13
59
const _ = !0 ;
14
60
}
15
61
}
16
62
63
+ #[ allow( clippy:: print_stdout, clippy:: use_debug) ]
17
64
fn main ( ) {
18
65
println ! ( "{:?}" , Flags :: ABC ) ;
19
66
}
You can’t perform that action at this time.
0 commit comments