Skip to content

Commit 5963b83

Browse files
committed
Revert "Modify other tests to align the change"
This reverts commit b543044.
1 parent 4b4424d commit 5963b83

6 files changed

+17
-25
lines changed

tests/ui/consts/do-not-ice-on-field-access-of-err-type.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ impl<T> Foo for T {}
44
fn main() {
55
let array = [(); { loop {} }]; //~ ERROR constant evaluation is taking a long time
66

7-
let tup = (7,); //~ ERROR type annotations needed for `({integer},)` [E0282]
7+
let tup = (7,);
88
let x: &dyn Foo = &tup.0;
99
}

tests/ui/consts/do-not-ice-on-field-access-of-err-type.stderr

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,5 @@ LL | let array = [(); { loop {} }];
1313
| ^^^^^^^^^^^
1414
= note: `#[deny(long_running_const_eval)]` on by default
1515

16-
error[E0282]: type annotations needed for `({integer},)`
17-
--> $DIR/do-not-ice-on-field-access-of-err-type.rs:7:9
18-
|
19-
LL | let tup = (7,);
20-
| ^^^
21-
|
22-
help: consider giving `tup` an explicit type, where the type for tuple `({integer},)` is specified
23-
|
24-
LL | let tup: ({integer},) = (7,);
25-
| ++++++++++++++
26-
27-
error: aborting due to 2 previous errors
16+
error: aborting due to 1 previous error
2817

29-
For more information about this error, try `rustc --explain E0282`.

tests/ui/privacy/no-ice-on-inference-failure.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ fn main_ref() {
1010
}];
1111

1212
let mut ptrs: Vec<*const [u8]> = vec![&array[0..0], &array[0..1], &array, &array[1..]];
13-
//~^ ERROR type annotations needed [E0282]
1413
}
1514

1615
fn main() {}

tests/ui/privacy/no-ice-on-inference-failure.stderr

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,5 @@ LL | | }];
2323
| |_____^
2424
= note: `#[deny(long_running_const_eval)]` on by default
2525

26-
error[E0282]: type annotations needed
27-
--> $DIR/no-ice-on-inference-failure.rs:12:50
28-
|
29-
LL | let mut ptrs: Vec<*const [u8]> = vec![&array[0..0], &array[0..1], &array, &array[1..]];
30-
| ^^^^ cannot infer type for struct `std::ops::Range<{integer}>`
31-
32-
error: aborting due to 2 previous errors
26+
error: aborting due to 1 previous error
3327

34-
For more information about this error, try `rustc --explain E0282`.

tests/ui/sized/ensure-overriding-bindings-in-pattern-with-ty-err-doesnt-ice.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ fn main() {
44
//~| ERROR cannot find type `T` in this scope
55
//~| ERROR const and type arguments are not allowed on builtin type `str`
66
//~| ERROR expected unit struct, unit variant or constant, found associated function `str<
7+
//~| ERROR type annotations needed
78
}

tests/ui/sized/ensure-overriding-bindings-in-pattern-with-ty-err-doesnt-ice.stderr

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,18 @@ error[E0533]: expected unit struct, unit variant or constant, found associated f
3434
LL | let str::<{fn str() { let str::T>>::as_bytes; }}, T>::as_bytes;
3535
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not a unit struct, unit variant or constant
3636

37-
error: aborting due to 4 previous errors
37+
error[E0282]: type annotations needed
38+
--> $DIR/ensure-overriding-bindings-in-pattern-with-ty-err-doesnt-ice.rs:2:31
39+
|
40+
LL | let str::<{fn str() { let str::T>>::as_bytes; }}, T>::as_bytes;
41+
| ^^^^^^^^^^^^^^^^^^
42+
|
43+
help: consider giving this pattern a type
44+
|
45+
LL | let str::<{fn str() { let str::T>>::as_bytes: /* Type */; }}, T>::as_bytes;
46+
| ++++++++++++
47+
48+
error: aborting due to 5 previous errors
3849

39-
Some errors have detailed explanations: E0109, E0412, E0533.
50+
Some errors have detailed explanations: E0109, E0282, E0412, E0533.
4051
For more information about an error, try `rustc --explain E0109`.

0 commit comments

Comments
 (0)