File tree 2 files changed +2
-17
lines changed
2 files changed +2
-17
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ extern crate proc_macros;
4
4
use proc_macros:: external;
5
5
6
6
#[ warn( clippy:: string_add) ]
7
- #[ allow( clippy:: string_add_assign, unused) ]
7
+ #[ allow( clippy:: assign_op_pattern , clippy :: string_add_assign, unused) ]
8
8
fn main ( ) {
9
9
// ignores assignment distinction
10
10
let mut x = String :: new ( ) ;
Original file line number Diff line number Diff line change 1
- error: manual implementation of an assign operation
2
- --> tests/ui/string_add.rs:13:9
3
- |
4
- LL | x = x + ".";
5
- | ^^^^^^^^^^^ help: replace it with: `x += "."`
6
- |
7
- = note: `-D clippy::assign-op-pattern` implied by `-D warnings`
8
- = help: to override `-D warnings` add `#[allow(clippy::assign_op_pattern)]`
9
-
10
1
error: you added something to a string. Consider using `String::push_str()` instead
11
2
--> tests/ui/string_add.rs:13:13
12
3
|
@@ -22,11 +13,5 @@ error: you added something to a string. Consider using `String::push_str()` inst
22
13
LL | let z = y + "...";
23
14
| ^^^^^^^^^
24
15
25
- error: manual implementation of an assign operation
26
- --> tests/ui/string_add.rs:22:5
27
- |
28
- LL | x = x + 1;
29
- | ^^^^^^^^^ help: replace it with: `x += 1`
30
-
31
- error: aborting due to 4 previous errors
16
+ error: aborting due to 2 previous errors
32
17
You can’t perform that action at this time.
0 commit comments