diff options
| author | Alex Burka <alex@alexburka.com> | 2017-02-09 20:37:59 +0000 |
|---|---|---|
| committer | Alex Burka <alex@alexburka.com> | 2017-02-09 22:45:42 +0000 |
| commit | 9fffd14171704eb4c2e0f658fc3dcc25f97ccc60 (patch) | |
| tree | 3bf2b357d2e9776d043b563c696e0a549d3b6ae7 /src/test | |
| parent | e7fc53b8f0595d9b5be6a3b64d29d3cfed7c7199 (diff) | |
| download | rust-9fffd14171704eb4c2e0f658fc3dcc25f97ccc60.tar.gz rust-9fffd14171704eb4c2e0f658fc3dcc25f97ccc60.zip | |
change span_notes to notes in E0368/E0369
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/compile-fail/binary-op-on-double-ref.rs | 2 | ||||
| -rw-r--r-- | src/test/parse-fail/issue-39018.stderr | 28 | ||||
| -rw-r--r-- | src/test/ui/span/issue-39018.stderr | 12 |
3 files changed, 3 insertions, 39 deletions
diff --git a/src/test/compile-fail/binary-op-on-double-ref.rs b/src/test/compile-fail/binary-op-on-double-ref.rs index a49cfaa1760..23ca026f541 100644 --- a/src/test/compile-fail/binary-op-on-double-ref.rs +++ b/src/test/compile-fail/binary-op-on-double-ref.rs @@ -13,7 +13,7 @@ fn main() { let vr = v.iter().filter(|x| { x % 2 == 0 //~^ ERROR binary operation `%` cannot be applied to type `&&{integer}` - //~| NOTE this is a reference of type that `%` can be applied to + //~| NOTE this is a reference to a type that `%` can be applied to //~| NOTE an implementation of `std::ops::Rem` might be missing for `&&{integer}` }); println!("{:?}", vr); diff --git a/src/test/parse-fail/issue-39018.stderr b/src/test/parse-fail/issue-39018.stderr deleted file mode 100644 index ee1a32c4c16..00000000000 --- a/src/test/parse-fail/issue-39018.stderr +++ /dev/null @@ -1,28 +0,0 @@ -error[E0369]: binary operation `+` cannot be applied to type `&'static str` - --> src/test/ui/span/issue-39018.rs:2:13 - | -2 | let x = "Hello " + "World!"; - | ^^^^^^^^ - | -note: `+` can't be used to concatenate two `&str` strings - --> src/test/ui/span/issue-39018.rs:2:13 - | -2 | let x = "Hello " + "World!"; - | ^^^^^^^^ -help: to_owned() can be used to create an owned `String` from a string reference. This allows concatenation since the `String` is owned. - | let x = "Hello ".to_owned() + "World!"; - -error[E0369]: binary operation `+` cannot be applied to type `World` - --> src/test/ui/span/issue-39018.rs:7:13 - | -7 | let y = World::Hello + World::Goodbye; - | ^^^^^^^^^^^^ - | -note: an implementation of `std::ops::Add` might be missing for `World` - --> src/test/ui/span/issue-39018.rs:7:13 - | -7 | let y = World::Hello + World::Goodbye; - | ^^^^^^^^^^^^ - -error: aborting due to 2 previous errors - diff --git a/src/test/ui/span/issue-39018.stderr b/src/test/ui/span/issue-39018.stderr index a8cc74056ca..9d6d4570c6b 100644 --- a/src/test/ui/span/issue-39018.stderr +++ b/src/test/ui/span/issue-39018.stderr @@ -4,11 +4,7 @@ error[E0369]: binary operation `+` cannot be applied to type `&'static str` 12 | let x = "Hello " + "World!"; | ^^^^^^^^ | -note: `+` can't be used to concatenate two `&str` strings - --> $DIR/issue-39018.rs:12:13 - | -12 | let x = "Hello " + "World!"; - | ^^^^^^^^ + = note: `+` 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. | let x = "Hello ".to_owned() + "World!"; @@ -18,11 +14,7 @@ error[E0369]: binary operation `+` cannot be applied to type `World` 17 | let y = World::Hello + World::Goodbye; | ^^^^^^^^^^^^ | -note: an implementation of `std::ops::Add` might be missing for `World` - --> $DIR/issue-39018.rs:17:13 - | -17 | let y = World::Hello + World::Goodbye; - | ^^^^^^^^^^^^ + = note: an implementation of `std::ops::Add` might be missing for `World` error: aborting due to 2 previous errors |
