@@ -2,135 +2,135 @@ error: used `assert_eq!` with a literal bool
2
2
--> $DIR/bool_assert_comparison.rs:69:5
3
3
|
4
4
LL | assert_eq!("a".is_empty(), false);
5
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `assert!(.. )`
5
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `assert!(!("a".is_empty()) )`
6
6
|
7
7
= note: `-D clippy::bool-assert-comparison` implied by `-D warnings`
8
8
9
9
error: used `assert_eq!` with a literal bool
10
10
--> $DIR/bool_assert_comparison.rs:70:5
11
11
|
12
12
LL | assert_eq!("".is_empty(), true);
13
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `assert!(.. )`
13
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `assert!("".is_empty() )`
14
14
15
15
error: used `assert_eq!` with a literal bool
16
16
--> $DIR/bool_assert_comparison.rs:71:5
17
17
|
18
18
LL | assert_eq!(true, "".is_empty());
19
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `assert!(.. )`
19
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `assert!("".is_empty() )`
20
20
21
21
error: used `assert_eq!` with a literal bool
22
22
--> $DIR/bool_assert_comparison.rs:76:5
23
23
|
24
24
LL | assert_eq!(b, true);
25
- | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `assert!(.. )`
25
+ | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `assert!(b )`
26
26
27
27
error: used `assert_ne!` with a literal bool
28
28
--> $DIR/bool_assert_comparison.rs:79:5
29
29
|
30
30
LL | assert_ne!("a".is_empty(), false);
31
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `assert!(.. )`
31
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `assert!("a".is_empty() )`
32
32
33
33
error: used `assert_ne!` with a literal bool
34
34
--> $DIR/bool_assert_comparison.rs:80:5
35
35
|
36
36
LL | assert_ne!("".is_empty(), true);
37
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `assert!(.. )`
37
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `assert!(!("".is_empty()) )`
38
38
39
39
error: used `assert_ne!` with a literal bool
40
40
--> $DIR/bool_assert_comparison.rs:81:5
41
41
|
42
42
LL | assert_ne!(true, "".is_empty());
43
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `assert!(.. )`
43
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `assert!(!("".is_empty()) )`
44
44
45
45
error: used `assert_ne!` with a literal bool
46
46
--> $DIR/bool_assert_comparison.rs:86:5
47
47
|
48
48
LL | assert_ne!(b, true);
49
- | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `assert!(.. )`
49
+ | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `assert!(!(b) )`
50
50
51
51
error: used `debug_assert_eq!` with a literal bool
52
52
--> $DIR/bool_assert_comparison.rs:89:5
53
53
|
54
54
LL | debug_assert_eq!("a".is_empty(), false);
55
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `debug_assert!(.. )`
55
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `debug_assert!(!("a".is_empty()) )`
56
56
57
57
error: used `debug_assert_eq!` with a literal bool
58
58
--> $DIR/bool_assert_comparison.rs:90:5
59
59
|
60
60
LL | debug_assert_eq!("".is_empty(), true);
61
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `debug_assert!(.. )`
61
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `debug_assert!("".is_empty() )`
62
62
63
63
error: used `debug_assert_eq!` with a literal bool
64
64
--> $DIR/bool_assert_comparison.rs:91:5
65
65
|
66
66
LL | debug_assert_eq!(true, "".is_empty());
67
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `debug_assert!(.. )`
67
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `debug_assert!("".is_empty() )`
68
68
69
69
error: used `debug_assert_eq!` with a literal bool
70
70
--> $DIR/bool_assert_comparison.rs:96:5
71
71
|
72
72
LL | debug_assert_eq!(b, true);
73
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `debug_assert!(.. )`
73
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `debug_assert!(b )`
74
74
75
75
error: used `debug_assert_ne!` with a literal bool
76
76
--> $DIR/bool_assert_comparison.rs:99:5
77
77
|
78
78
LL | debug_assert_ne!("a".is_empty(), false);
79
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `debug_assert!(.. )`
79
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `debug_assert!("a".is_empty() )`
80
80
81
81
error: used `debug_assert_ne!` with a literal bool
82
82
--> $DIR/bool_assert_comparison.rs:100:5
83
83
|
84
84
LL | debug_assert_ne!("".is_empty(), true);
85
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `debug_assert!(.. )`
85
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `debug_assert!(!("".is_empty()) )`
86
86
87
87
error: used `debug_assert_ne!` with a literal bool
88
88
--> $DIR/bool_assert_comparison.rs:101:5
89
89
|
90
90
LL | debug_assert_ne!(true, "".is_empty());
91
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `debug_assert!(.. )`
91
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `debug_assert!(!("".is_empty()) )`
92
92
93
93
error: used `debug_assert_ne!` with a literal bool
94
94
--> $DIR/bool_assert_comparison.rs:106:5
95
95
|
96
96
LL | debug_assert_ne!(b, true);
97
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `debug_assert!(.. )`
97
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `debug_assert!(!(b) )`
98
98
99
99
error: used `assert_eq!` with a literal bool
100
100
--> $DIR/bool_assert_comparison.rs:111:5
101
101
|
102
102
LL | assert_eq!("a".is_empty(), false, "tadam {}", 1);
103
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `assert!(.. )`
103
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `assert!(!("a".is_empty()) )`
104
104
105
105
error: used `assert_eq!` with a literal bool
106
106
--> $DIR/bool_assert_comparison.rs:112:5
107
107
|
108
108
LL | assert_eq!("a".is_empty(), false, "tadam {}", true);
109
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `assert!(.. )`
109
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `assert!(!("a".is_empty()) )`
110
110
111
111
error: used `assert_eq!` with a literal bool
112
112
--> $DIR/bool_assert_comparison.rs:113:5
113
113
|
114
114
LL | assert_eq!(false, "a".is_empty(), "tadam {}", true);
115
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `assert!(.. )`
115
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `assert!(!("a".is_empty()) )`
116
116
117
117
error: used `debug_assert_eq!` with a literal bool
118
118
--> $DIR/bool_assert_comparison.rs:118:5
119
119
|
120
120
LL | debug_assert_eq!("a".is_empty(), false, "tadam {}", 1);
121
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `debug_assert!(.. )`
121
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `debug_assert!(!("a".is_empty()) )`
122
122
123
123
error: used `debug_assert_eq!` with a literal bool
124
124
--> $DIR/bool_assert_comparison.rs:119:5
125
125
|
126
126
LL | debug_assert_eq!("a".is_empty(), false, "tadam {}", true);
127
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `debug_assert!(.. )`
127
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `debug_assert!(!("a".is_empty()) )`
128
128
129
129
error: used `debug_assert_eq!` with a literal bool
130
130
--> $DIR/bool_assert_comparison.rs:120:5
131
131
|
132
132
LL | debug_assert_eq!(false, "a".is_empty(), "tadam {}", true);
133
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `debug_assert!(.. )`
133
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `debug_assert!(!("a".is_empty()) )`
134
134
135
135
error: aborting due to 22 previous errors
136
136
0 commit comments