]> git.lizzy.rs Git - rust.git/commitdiff
fix tidy checks
authorGauri <f2013002@goa.bits-pilani.ac.in>
Tue, 16 Jan 2018 20:01:21 +0000 (01:31 +0530)
committerGauri <f2013002@goa.bits-pilani.ac.in>
Tue, 16 Jan 2018 20:01:21 +0000 (01:31 +0530)
src/test/ui/issue-47377-1.rs [deleted file]
src/test/ui/issue-47377-1.stderr [deleted file]
src/test/ui/issue-47377.rs
src/test/ui/issue-47377.stderr
src/test/ui/issue-47380.rs [new file with mode: 0644]
src/test/ui/issue-47380.stderr [new file with mode: 0644]

diff --git a/src/test/ui/issue-47377-1.rs b/src/test/ui/issue-47377-1.rs
deleted file mode 100644 (file)
index f173d00..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <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";
-        println!("🦀🦀🦀🦀🦀"); let _a = b + ", World!"; //~ERROR 13:37: 13:51: binary operation `+` cannot be applied to type `&str` [E0369]
-}
\ No newline at end of file
diff --git a/src/test/ui/issue-47377-1.stderr b/src/test/ui/issue-47377-1.stderr
deleted file mode 100644 (file)
index aad5373..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0369]: binary operation `+` cannot be applied to type `&str`
-  --> $DIR/issue-47377-1.rs:13:37
-   |
-13 |         println!("🦀🦀🦀🦀🦀"); let _a = b + ", World!"; //~ERROR 13:37: 13:51: binary operation `+` cannot be applied to type `&str` [E0369]
-   |                                          ^^^^^^^^^^^^^^ `+` 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 13:37: 13:51: binary operation `+` cannot be applied to type `&str` [E0369]
-   |                                          ^^^^^^^^^^^^
-
-error: aborting due to previous error
-
index 2a8f2e30c0e88530c393d62625cae42f9809d6c1..f2e18590ddef51e22629d46f3db3663be83586a0 100644 (file)
@@ -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]
-}
\ No newline at end of file
+    let _a = b + ", World!";
+    //~^ ERROR E0369
+}
index e9f285a19c3d9c387b37163872244c6aa8c267e4..b80867f1714a086f1c1c6789ab2f0e01ce86d1fc 100644 (file)
@@ -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
diff --git a/src/test/ui/issue-47380.rs b/src/test/ui/issue-47380.rs
new file mode 100644 (file)
index 0000000..748891f
--- /dev/null
@@ -0,0 +1,15 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <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 E0369
+}
diff --git a/src/test/ui/issue-47380.stderr b/src/test/ui/issue-47380.stderr
new file mode 100644 (file)
index 0000000..8ead169
--- /dev/null
@@ -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
+