Skip to content

Commit

Permalink
fix tidy checks
Browse files Browse the repository at this point in the history
  • Loading branch information
gaurikholkar committed Jan 16, 2018
1 parent 3c8c505 commit d769539
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 21 deletions.
12 changes: 0 additions & 12 deletions src/test/ui/issue-47377-1.stderr

This file was deleted.

6 changes: 3 additions & 3 deletions src/test/ui/issue-47377.rs
Expand Up @@ -7,8 +7,8 @@
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

fn main(){
let b = "hello";
let _a = b + ", World!"; //~ERROR 13:14: 13:28: binary operation `+` cannot be applied to type `&str` [E0369]
}
let _a = b + ", World!";
//~^ ERROR E0369
}
6 changes: 3 additions & 3 deletions src/test/ui/issue-47377.stderr
@@ -1,11 +1,11 @@
error[E0369]: binary operation `+` cannot be applied to type `&str`
--> $DIR/issue-47377.rs:13:14
--> $DIR/issue-47377.rs:12:14
|
13 | let _a = b + ", World!"; //~ERROR 13:14: 13:28: binary operation `+` cannot be applied to type `&str` [E0369]
12 | let _a = b + ", World!";
| ^^^^^^^^^^^^^^ `+` can't be used to concatenate two `&str` strings
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
|
13 | let _a = b.to_owned() + ", World!"; //~ERROR 13:14: 13:28: binary operation `+` cannot be applied to type `&str` [E0369]
12 | let _a = b.to_owned() + ", World!";
| ^^^^^^^^^^^^

error: aborting due to previous error
Expand Down
7 changes: 4 additions & 3 deletions src/test/ui/issue-47377-1.rs → src/test/ui/issue-47380.rs
Expand Up @@ -7,8 +7,9 @@
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-tidy-tab
fn main(){
let b = "hello";
println!("🦀🦀🦀🦀🦀"); let _a = b + ", World!"; //~ERROR 13:37: 13:51: binary operation `+` cannot be applied to type `&str` [E0369]
}
println!("🦀🦀🦀🦀🦀"); let _a = b + ", World!";
//~^ ERROR E0369
}
12 changes: 12 additions & 0 deletions src/test/ui/issue-47380.stderr
@@ -0,0 +1,12 @@
error[E0369]: binary operation `+` cannot be applied to type `&str`
--> $DIR/blah.rs:13:33
|
13 | println!("🦀🦀🦀🦀🦀"); let _a = b + ", World!";
| ^^^^^^^^^^^^^^ `+` can't be used to concatenate two `&str` strings
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
|
13 | println!("🦀🦀🦀🦀🦀"); let _a = b.to_owned() + ", World!";
| ^^^^^^^^^^^^

error: aborting due to previous error

0 comments on commit d769539

Please sign in to comment.