Skip to content

Commit 05174fb

Browse files
committed
tidy never type issue-* tests
1 parent eef3c4d commit 05174fb

14 files changed

Lines changed: 36 additions & 98 deletions

src/tools/tidy/src/issues.txt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1726,14 +1726,6 @@ ui/moves/issue-46099-move-in-macro.rs
17261726
ui/moves/issue-72649-uninit-in-loop.rs
17271727
ui/moves/issue-75904-move-closure-loop.rs
17281728
ui/moves/issue-99470-move-out-of-some.rs
1729-
ui/never_type/issue-10176.rs
1730-
ui/never_type/issue-13352.rs
1731-
ui/never_type/issue-2149.rs
1732-
ui/never_type/issue-44402.rs
1733-
ui/never_type/issue-51506.rs
1734-
ui/never_type/issue-52443.rs
1735-
ui/never_type/issue-5500-1.rs
1736-
ui/never_type/issue-96335.rs
17371729
ui/nll/closure-requirements/issue-58127-mutliple-requirements.rs
17381730
ui/nll/issue-112604-closure-output-normalize.rs
17391731
ui/nll/issue-16223.rs

tests/ui/never_type/regress/issue-5500-1.rs renamed to tests/ui/never_type/regress/address-of-never.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1+
// Regression test for <https://github.com/rust-lang/rust/issues/5500>,
2+
// check that you can take a reference to the never type.
3+
//
14
//@ edition:2015..2021
2-
// MIR doesn't generate an error because the assignment isn't reachable. This
3-
// is OK because the test is here to check that the compiler doesn't ICE (cf.
4-
// #5500).
5-
65
//@ check-pass
76

87
struct TrieMapIterator<'a> {

tests/ui/never_type/regress/divergent-block-with-tail.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0308]: mismatched types
2-
--> $DIR/diverging-tuple-parts-39485.rs:9:5
2+
--> $DIR/divergent-block-with-tail.rs:12:5
33
|
44
LL | &panic!()
55
| ^^^^^^^^^ expected `()`, found `&_`
@@ -17,7 +17,7 @@ LL + panic!()
1717
|
1818

1919
error[E0308]: mismatched types
20-
--> $DIR/diverging-tuple-parts-39485.rs:13:5
20+
--> $DIR/divergent-block-with-tail.rs:17:5
2121
|
2222
LL | fn f() -> isize {
2323
| ----- expected `isize` because of return type

tests/ui/never_type/regress/issue-13352.rs

Lines changed: 0 additions & 9 deletions
This file was deleted.

tests/ui/never_type/regress/issue-13352.stderr

Lines changed: 0 additions & 28 deletions
This file was deleted.

tests/ui/never_type/regress/issue-44402.rs

Lines changed: 0 additions & 34 deletions
This file was deleted.

tests/ui/never_type/regress/issue-52443.rs renamed to tests/ui/never_type/regress/loop-in-array-length.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Regression test for <https://github.com/rust-lang/rust/issues/52443>
2+
13
fn main() {
24
[(); & { loop { continue } } ]; //~ ERROR mismatched types
35

tests/ui/never_type/regress/issue-52443.stderr renamed to tests/ui/never_type/regress/loop-in-array-length.stderr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
warning: denote infinite loops with `loop { ... }`
2-
--> $DIR/issue-52443.rs:6:11
2+
--> $DIR/loop-in-array-length.rs:8:11
33
|
44
LL | [(); {while true {break}; 0}];
55
| ^^^^^^^^^^ help: use `loop`
66
|
77
= note: `#[warn(while_true)]` on by default
88

99
error[E0308]: mismatched types
10-
--> $DIR/issue-52443.rs:2:10
10+
--> $DIR/loop-in-array-length.rs:4:10
1111
|
1212
LL | [(); & { loop { continue } } ];
1313
| ^^^^^^^^^^^^^^^^^^^^^^^ expected `usize`, found `&_`
@@ -21,7 +21,7 @@ LL + [(); { loop { continue } } ];
2121
|
2222

2323
error[E0308]: mismatched types
24-
--> $DIR/issue-52443.rs:4:17
24+
--> $DIR/loop-in-array-length.rs:6:17
2525
|
2626
LL | [(); loop { break }];
2727
| ^^^^^ expected `usize`, found `()`
@@ -32,7 +32,7 @@ LL | [(); loop { break 42 }];
3232
| ++
3333

3434
error[E0277]: the trait bound `std::ops::RangeFrom<usize>: const Iterator` is not satisfied
35-
--> $DIR/issue-52443.rs:9:21
35+
--> $DIR/loop-in-array-length.rs:11:21
3636
|
3737
LL | [(); { for _ in 0usize.. {}; 0}];
3838
| ^^^^^^^^ required by a bound introduced by this call
@@ -42,7 +42,7 @@ note: trait `Iterator` is implemented but not `const`
4242
= note: required for `std::ops::RangeFrom<usize>` to implement `const IntoIterator`
4343

4444
error[E0277]: the trait bound `std::ops::RangeFrom<usize>: const Iterator` is not satisfied
45-
--> $DIR/issue-52443.rs:9:21
45+
--> $DIR/loop-in-array-length.rs:11:21
4646
|
4747
LL | [(); { for _ in 0usize.. {}; 0}];
4848
| ^^^^^^^^

tests/ui/never_type/regress/issue-96335.rs renamed to tests/ui/never_type/regress/malformed-range-to-never.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Regression test for <https://github.com/rust-lang/rust/issues/96335>
2+
13
fn main() {
24
0.....{loop{}1};
35
//~^ ERROR unexpected token

tests/ui/never_type/regress/issue-96335.stderr renamed to tests/ui/never_type/regress/malformed-range-to-never.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: unexpected token: `...`
2-
--> $DIR/issue-96335.rs:2:6
2+
--> $DIR/malformed-range-to-never.rs:4:6
33
|
44
LL | 0.....{loop{}1};
55
| ^^^
@@ -16,7 +16,7 @@ LL + 0..=..{loop{}1};
1616
|
1717

1818
error[E0308]: mismatched types
19-
--> $DIR/issue-96335.rs:2:9
19+
--> $DIR/malformed-range-to-never.rs:4:9
2020
|
2121
LL | 0.....{loop{}1};
2222
| ----^^^^^^^^^^^

0 commit comments

Comments
 (0)