File tree Expand file tree Collapse file tree 2 files changed +2
-17
lines changed Expand file tree Collapse file tree 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;
44use proc_macros:: external;
55
66#[ warn( clippy:: string_add) ]
7- #[ allow( clippy:: string_add_assign, unused) ]
7+ #[ allow( clippy:: assign_op_pattern , clippy :: string_add_assign, unused) ]
88fn main ( ) {
99 // ignores assignment distinction
1010 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-
101error: you added something to a string. Consider using `String::push_str()` instead
112 --> tests/ui/string_add.rs:13:13
123 |
@@ -22,11 +13,5 @@ error: you added something to a string. Consider using `String::push_str()` inst
2213LL | let z = y + "...";
2314 | ^^^^^^^^^
2415
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
3217
You can’t perform that action at this time.
0 commit comments