mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-17 06:28:42 +00:00
fixed error messages in compile-fail test
This commit is contained in:
parent
a00270c5b1
commit
f67175b4cd
1 changed files with 5 additions and 5 deletions
|
@ -7,11 +7,11 @@ fn add_only() { // ignores assignment distinction
|
|||
let mut x = "".to_owned();
|
||||
|
||||
for _ in (1..3) {
|
||||
x = x + "."; //~ERROR you add something to a string.
|
||||
x = x + "."; //~ERROR you added something to a string.
|
||||
}
|
||||
|
||||
let y = "".to_owned();
|
||||
let z = y + "..."; //~ERROR you add something to a string.
|
||||
let z = y + "..."; //~ERROR you added something to a string.
|
||||
|
||||
assert_eq!(&x, &z);
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ fn add_assign_only() {
|
|||
let mut x = "".to_owned();
|
||||
|
||||
for _ in (1..3) {
|
||||
x = x + "."; //~ERROR you assign the result of adding something to this string.
|
||||
x = x + "."; //~ERROR you assigned the result of adding something to this string.
|
||||
}
|
||||
|
||||
let y = "".to_owned();
|
||||
|
@ -35,11 +35,11 @@ fn both() {
|
|||
let mut x = "".to_owned();
|
||||
|
||||
for _ in (1..3) {
|
||||
x = x + "."; //~ERROR you assign the result of adding something to this string.
|
||||
x = x + "."; //~ERROR you assigned the result of adding something to this string.
|
||||
}
|
||||
|
||||
let y = "".to_owned();
|
||||
let z = y + "..."; //~ERROR you add something to a string.
|
||||
let z = y + "..."; //~ERROR you added something to a string.
|
||||
|
||||
assert_eq!(&x, &z);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue