Skip to content

Commit 99638a6

Browse files
committed
revert change to test source
1 parent eb13b7b commit 99638a6

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

tests/ui/higher-rank-trait-bounds/issue-62203-hrtb-ice.rs

+9-7
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,16 @@ trait Ty<'a> {
3535
}
3636

3737
fn main() {
38-
let v = Unit2.m(L {
39-
//~^ ERROR type mismatch
40-
//~| ERROR to be a closure that returns `Unit3`, but it returns `Unit4`
41-
f: |x| {
42-
drop(x);
43-
Unit4
38+
let v = Unit2.m(
39+
L {
40+
//~^ ERROR to be a closure that returns `Unit3`, but it returns `Unit4`
41+
//~| ERROR type mismatch
42+
f: |x| {
43+
drop(x);
44+
Unit4
45+
},
4446
},
45-
});
47+
);
4648
}
4749

4850
impl<'a> Ty<'a> for Unit2 {

tests/ui/higher-rank-trait-bounds/issue-62203-hrtb-ice.stderr

+17-19
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
error[E0271]: type mismatch resolving `for<'r> <L<[closure@issue-62203-hrtb-ice.rs:41:12]> as T0<'r, (&'r u8,)>>::O == <_ as Ty<'r>>::V`
2-
--> $DIR/issue-62203-hrtb-ice.rs:38:21
1+
error[E0271]: type mismatch resolving `for<'r> <L<[closure@issue-62203-hrtb-ice.rs:42:16]> as T0<'r, (&'r u8,)>>::O == <_ as Ty<'r>>::V`
2+
--> $DIR/issue-62203-hrtb-ice.rs:39:9
33
|
4-
LL | let v = Unit2.m(L {
5-
| ___________________-_^
6-
| | |
7-
| | required by a bound introduced by this call
4+
LL | let v = Unit2.m(
5+
| - required by a bound introduced by this call
6+
LL | / L {
87
LL | |
98
LL | |
10-
LL | | f: |x| {
9+
LL | | f: |x| {
1110
... |
11+
LL | | },
1212
LL | | },
13-
LL | | });
14-
| |_____^ type mismatch resolving `for<'r> <L<[closure@issue-62203-hrtb-ice.rs:41:12]> as T0<'r, (&'r u8,)>>::O == <_ as Ty<'r>>::V`
13+
| |_________^ type mismatch resolving `for<'r> <L<[closure@issue-62203-hrtb-ice.rs:42:16]> as T0<'r, (&'r u8,)>>::O == <_ as Ty<'r>>::V`
1514
|
1615
note: expected this to be `<_ as Ty<'_>>::V`
1716
--> $DIR/issue-62203-hrtb-ice.rs:21:14
@@ -31,22 +30,21 @@ LL | where
3130
LL | F: for<'r> T0<'r, (<Self as Ty<'r>>::V,), O = <B as Ty<'r>>::V>,
3231
| ^^^^^^^^^^^^^^^^^^^^ required by this bound in `T1::m`
3332

34-
error[E0271]: expected `[closure@issue-62203-hrtb-ice.rs:41:12]` to be a closure that returns `Unit3`, but it returns `Unit4`
35-
--> $DIR/issue-62203-hrtb-ice.rs:38:21
33+
error[E0271]: expected `[closure@issue-62203-hrtb-ice.rs:42:16]` to be a closure that returns `Unit3`, but it returns `Unit4`
34+
--> $DIR/issue-62203-hrtb-ice.rs:39:9
3635
|
37-
LL | let v = Unit2.m(L {
38-
| ___________________-_^
39-
| | |
40-
| | required by a bound introduced by this call
36+
LL | let v = Unit2.m(
37+
| - required by a bound introduced by this call
38+
LL | / L {
4139
LL | |
4240
LL | |
43-
LL | | f: |x| {
41+
LL | | f: |x| {
4442
... |
43+
LL | | },
4544
LL | | },
46-
LL | | });
47-
| |_____^ expected struct `Unit3`, found struct `Unit4`
45+
| |_________^ expected struct `Unit3`, found struct `Unit4`
4846
|
49-
note: required for `L<[closure@$DIR/issue-62203-hrtb-ice.rs:41:12: 41:15]>` to implement `for<'r> T0<'r, (&'r u8,)>`
47+
note: required for `L<[closure@$DIR/issue-62203-hrtb-ice.rs:42:16: 42:19]>` to implement `for<'r> T0<'r, (&'r u8,)>`
5048
--> $DIR/issue-62203-hrtb-ice.rs:17:16
5149
|
5250
LL | impl<'a, A, T> T0<'a, A> for L<T>

0 commit comments

Comments
 (0)