Skip to content

Commit

Permalink
tests: fix fallout from changing the span of binop errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyb committed Jun 1, 2017
1 parent 58632f3 commit 5fb37be
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 24 deletions.
4 changes: 2 additions & 2 deletions src/test/ui/impl-trait/equality.stderr
Expand Up @@ -8,10 +8,10 @@ error[E0308]: mismatched types
found type `u32`

error[E0277]: the trait bound `u32: std::ops::Add<impl Foo>` is not satisfied
--> $DIR/equality.rs:34:9
--> $DIR/equality.rs:34:11
|
34 | n + sum_to(n - 1)
| ^^^^^^^^^^^^^^^^^ no implementation for `u32 + impl Foo`
| ^ no implementation for `u32 + impl Foo`
|
= help: the trait `std::ops::Add<impl Foo>` is not implemented for `u32`

Expand Down
28 changes: 14 additions & 14 deletions src/test/ui/mismatched_types/binops.stderr
@@ -1,56 +1,56 @@
error[E0277]: the trait bound `{integer}: std::ops::Add<std::option::Option<{integer}>>` is not satisfied
--> $DIR/binops.rs:12:5
--> $DIR/binops.rs:12:7
|
12 | 1 + Some(1);
| ^^^^^^^^^^^ no implementation for `{integer} + std::option::Option<{integer}>`
| ^ no implementation for `{integer} + std::option::Option<{integer}>`
|
= help: the trait `std::ops::Add<std::option::Option<{integer}>>` is not implemented for `{integer}`

error[E0277]: the trait bound `usize: std::ops::Sub<std::option::Option<{integer}>>` is not satisfied
--> $DIR/binops.rs:13:5
--> $DIR/binops.rs:13:16
|
13 | 2 as usize - Some(1);
| ^^^^^^^^^^^^^^^^^^^^ no implementation for `usize - std::option::Option<{integer}>`
| ^ no implementation for `usize - std::option::Option<{integer}>`
|
= help: the trait `std::ops::Sub<std::option::Option<{integer}>>` is not implemented for `usize`

error[E0277]: the trait bound `{integer}: std::ops::Mul<()>` is not satisfied
--> $DIR/binops.rs:14:5
--> $DIR/binops.rs:14:7
|
14 | 3 * ();
| ^^^^^^ no implementation for `{integer} * ()`
| ^ no implementation for `{integer} * ()`
|
= help: the trait `std::ops::Mul<()>` is not implemented for `{integer}`

error[E0277]: the trait bound `{integer}: std::ops::Div<&str>` is not satisfied
--> $DIR/binops.rs:15:5
--> $DIR/binops.rs:15:7
|
15 | 4 / "";
| ^^^^^^ no implementation for `{integer} / &str`
| ^ no implementation for `{integer} / &str`
|
= help: the trait `std::ops::Div<&str>` is not implemented for `{integer}`

error[E0277]: the trait bound `{integer}: std::cmp::PartialEq<std::string::String>` is not satisfied
--> $DIR/binops.rs:16:5
--> $DIR/binops.rs:16:7
|
16 | 5 < String::new();
| ^^^^^^^^^^^^^^^^^ can't compare `{integer}` with `std::string::String`
| ^ can't compare `{integer}` with `std::string::String`
|
= help: the trait `std::cmp::PartialEq<std::string::String>` is not implemented for `{integer}`

error[E0277]: the trait bound `{integer}: std::cmp::PartialOrd<std::string::String>` is not satisfied
--> $DIR/binops.rs:16:5
--> $DIR/binops.rs:16:7
|
16 | 5 < String::new();
| ^^^^^^^^^^^^^^^^^ can't compare `{integer}` with `std::string::String`
| ^ can't compare `{integer}` with `std::string::String`
|
= help: the trait `std::cmp::PartialOrd<std::string::String>` is not implemented for `{integer}`

error[E0277]: the trait bound `{integer}: std::cmp::PartialEq<std::result::Result<{integer}, _>>` is not satisfied
--> $DIR/binops.rs:17:5
--> $DIR/binops.rs:17:7
|
17 | 6 == Ok(1);
| ^^^^^^^^^^ can't compare `{integer}` with `std::result::Result<{integer}, _>`
| ^^ can't compare `{integer}` with `std::result::Result<{integer}, _>`
|
= help: the trait `std::cmp::PartialEq<std::result::Result<{integer}, _>>` is not implemented for `{integer}`

Expand Down
11 changes: 3 additions & 8 deletions src/test/ui/span/multiline-span-simple.stderr
@@ -1,13 +1,8 @@
error[E0277]: the trait bound `u32: std::ops::Add<()>` is not satisfied
--> $DIR/multiline-span-simple.rs:23:9
--> $DIR/multiline-span-simple.rs:23:18
|
23 | foo(1 as u32 +
| _________^
24 | |
25 | | bar(x,
26 | |
27 | | y),
| |______________^ no implementation for `u32 + ()`
23 | foo(1 as u32 +
| ^ no implementation for `u32 + ()`
|
= help: the trait `std::ops::Add<()>` is not implemented for `u32`

Expand Down

0 comments on commit 5fb37be

Please sign in to comment.