Skip to content

Commit 5fb37be

Browse files
committed
tests: fix fallout from changing the span of binop errors.
1 parent 58632f3 commit 5fb37be

File tree

3 files changed

+19
-24
lines changed

3 files changed

+19
-24
lines changed

src/test/ui/impl-trait/equality.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ error[E0308]: mismatched types
88
found type `u32`
99

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

src/test/ui/mismatched_types/binops.stderr

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,56 @@
11
error[E0277]: the trait bound `{integer}: std::ops::Add<std::option::Option<{integer}>>` is not satisfied
2-
--> $DIR/binops.rs:12:5
2+
--> $DIR/binops.rs:12:7
33
|
44
12 | 1 + Some(1);
5-
| ^^^^^^^^^^^ no implementation for `{integer} + std::option::Option<{integer}>`
5+
| ^ no implementation for `{integer} + std::option::Option<{integer}>`
66
|
77
= help: the trait `std::ops::Add<std::option::Option<{integer}>>` is not implemented for `{integer}`
88

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

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

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

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

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

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

src/test/ui/span/multiline-span-simple.stderr

+3-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
error[E0277]: the trait bound `u32: std::ops::Add<()>` is not satisfied
2-
--> $DIR/multiline-span-simple.rs:23:9
2+
--> $DIR/multiline-span-simple.rs:23:18
33
|
4-
23 | foo(1 as u32 +
5-
| _________^
6-
24 | |
7-
25 | | bar(x,
8-
26 | |
9-
27 | | y),
10-
| |______________^ no implementation for `u32 + ()`
4+
23 | foo(1 as u32 +
5+
| ^ no implementation for `u32 + ()`
116
|
127
= help: the trait `std::ops::Add<()>` is not implemented for `u32`
138

0 commit comments

Comments
 (0)