Skip to content

Commit d769539

Browse files
committed
fix tidy checks
1 parent 3c8c505 commit d769539

File tree

5 files changed

+22
-21
lines changed

5 files changed

+22
-21
lines changed

β€Žsrc/test/ui/issue-47377-1.stderr

Lines changed: 0 additions & 12 deletions
This file was deleted.

β€Žsrc/test/ui/issue-47377.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
10-
1110
fn main(){
1211
let b = "hello";
13-
let _a = b + ", World!"; //~ERROR 13:14: 13:28: binary operation `+` cannot be applied to type `&str` [E0369]
14-
}
12+
let _a = b + ", World!";
13+
//~^ ERROR E0369
14+
}

β€Žsrc/test/ui/issue-47377.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error[E0369]: binary operation `+` cannot be applied to type `&str`
2-
--> $DIR/issue-47377.rs:13:14
2+
--> $DIR/issue-47377.rs:12:14
33
|
4-
13 | let _a = b + ", World!"; //~ERROR 13:14: 13:28: binary operation `+` cannot be applied to type `&str` [E0369]
4+
12 | let _a = b + ", World!";
55
| ^^^^^^^^^^^^^^ `+` can't be used to concatenate two `&str` strings
66
help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left
77
|
8-
13 | let _a = b.to_owned() + ", World!"; //~ERROR 13:14: 13:28: binary operation `+` cannot be applied to type `&str` [E0369]
8+
12 | let _a = b.to_owned() + ", World!";
99
| ^^^^^^^^^^^^
1010

1111
error: aborting due to previous error

β€Žsrc/test/ui/issue-47377-1.rs renamed to β€Žsrc/test/ui/issue-47380.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
10-
10+
// ignore-tidy-tab
1111
fn main(){
1212
let b = "hello";
13-
println!("πŸ¦€πŸ¦€πŸ¦€πŸ¦€πŸ¦€"); let _a = b + ", World!"; //~ERROR 13:37: 13:51: binary operation `+` cannot be applied to type `&str` [E0369]
14-
}
13+
println!("πŸ¦€πŸ¦€πŸ¦€πŸ¦€πŸ¦€"); let _a = b + ", World!";
14+
//~^ ERROR E0369
15+
}

β€Žsrc/test/ui/issue-47380.stderr

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
error[E0369]: binary operation `+` cannot be applied to type `&str`
2+
--> $DIR/blah.rs:13:33
3+
|
4+
13 | println!("πŸ¦€πŸ¦€πŸ¦€πŸ¦€πŸ¦€"); let _a = b + ", World!";
5+
| ^^^^^^^^^^^^^^ `+` can't be used to concatenate two `&str` strings
6+
help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left
7+
|
8+
13 | println!("πŸ¦€πŸ¦€πŸ¦€πŸ¦€πŸ¦€"); let _a = b.to_owned() + ", World!";
9+
| ^^^^^^^^^^^^
10+
11+
error: aborting due to previous error
12+

0 commit comments

Comments
Β (0)