Skip to content

Commit ef54203

Browse files
authored
Rollup merge of #65438 - Centril:almost, r=varkor
Organize `never_type` tests Extracted from #65355. This just moves some tests around to make things better categorized. r? @varkor
2 parents 6416079 + 1fb8cfb commit ef54203

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+27
-19
lines changed

src/test/ui/coercion/coerce-issue-49593-box-never.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// build-pass (FIXME(62277): could be check-pass?)
1+
// check-pass
22

33
#![feature(never_type)]
44
#![allow(unreachable_code)]

src/test/ui/feature-gates/feature-gate-exhaustive-patterns.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![feature(never_type)]
2+
23
fn foo() -> Result<u32, !> {
34
Ok(123)
45
}

src/test/ui/feature-gates/feature-gate-exhaustive-patterns.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0005]: refutable pattern in local binding: `Err(_)` not covered
2-
--> $DIR/feature-gate-exhaustive-patterns.rs:7:9
2+
--> $DIR/feature-gate-exhaustive-patterns.rs:8:9
33
|
44
LL | let Ok(_x) = foo();
55
| ^^^^^^ pattern `Err(_)` not covered

src/test/ui/for-loop-while/loop-break-value.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// run-pass
2+
23
#![allow(unreachable_code)]
34
#![feature(never_type)]
45

src/test/ui/lint/must_use-unit.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![feature(never_type)]
2-
32
#![deny(unused_must_use)]
43

54
#[must_use]

src/test/ui/lint/must_use-unit.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
error: unused return value of `foo` that must be used
2-
--> $DIR/must_use-unit.rs:14:5
2+
--> $DIR/must_use-unit.rs:13:5
33
|
44
LL | foo();
55
| ^^^^^^
66
|
77
note: lint level defined here
8-
--> $DIR/must_use-unit.rs:3:9
8+
--> $DIR/must_use-unit.rs:2:9
99
|
1010
LL | #![deny(unused_must_use)]
1111
| ^^^^^^^^^^^^^^^
1212

1313
error: unused return value of `bar` that must be used
14-
--> $DIR/must_use-unit.rs:16:5
14+
--> $DIR/must_use-unit.rs:15:5
1515
|
1616
LL | bar();
1717
| ^^^^^^

src/test/run-fail/adjust_never.rs renamed to src/test/ui/never_type/adjust_never.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Test that a variable of type ! can coerce to another type.
22

3+
// run-fail
34
// error-pattern:explicit
45

56
#![feature(never_type)]

src/test/run-fail/call-fn-never-arg.rs renamed to src/test/ui/never_type/call-fn-never-arg.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Test that we can use a ! for an argument of type !
22

3+
// run-fail
34
// error-pattern:wowzers!
45

56
#![feature(never_type)]

0 commit comments

Comments
 (0)