Skip to content

Commit 3f606fa

Browse files
committed
minor test improvements
1 parent 7d33e7e commit 3f606fa

9 files changed

+11
-11
lines changed

tests/ui/never_type/call-fn-never-arg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//@ check-pass
44

55
#![feature(never_type)]
6-
#![allow(unreachable_code)]
6+
#![expect(unreachable_code)]
77

88
fn foo(x: !) -> ! {
99
x

tests/ui/never_type/exhaustive_patterns.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//
44
//@ check-fail
55

6-
#![feature(exhaustive_patterns, never_type)]
6+
#![feature(never_type)]
77

88
mod inner {
99
pub struct Wrapper<T>(T);

tests/ui/never_type/impl-for-never.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Test that we can call static methods on ! both directly and when it appears in a generic
22
//
33
//@ run-pass
4+
//@ check-run-results
45

56
#![feature(never_type)]
67

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
! is !
2+
None is none

tests/ui/never_type/never-assign-dead-code.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//@ check-pass
44

55
#![feature(never_type)]
6-
#![allow(dropping_copy_types)]
6+
#![expect(dropping_copy_types)]
77
#![warn(unused)]
88

99
fn main() {

tests/ui/never_type/never-assign-wrong-type.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Test that we can't use another type in place of !
22

33
#![feature(never_type)]
4-
#![deny(warnings)]
54

65
fn main() {
76
let x: ! = "hello"; //~ ERROR mismatched types

tests/ui/never_type/never-assign-wrong-type.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0308]: mismatched types
2-
--> $DIR/never-assign-wrong-type.rs:7:16
2+
--> $DIR/never-assign-wrong-type.rs:6:16
33
|
44
LL | let x: ! = "hello";
55
| - ^^^^^^^ expected `!`, found `&str`

tests/ui/never_type/never-result.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
//
44
//@ run-pass
55

6-
#![allow(unused_variables)]
7-
#![allow(unreachable_code)]
8-
#![allow(unreachable_patterns)]
9-
// Test that we can extract a ! through pattern matching then use it as several different types.
106
#![feature(never_type)]
7+
#![expect(unused_variables)]
8+
#![expect(unreachable_code)]
119

1210
fn main() {
1311
let x: Result<u32, !> = Ok(123);

tests/ui/never_type/never_transmute_never.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
#![feature(never_type)]
44
#![allow(dead_code)]
5-
#![allow(unreachable_code)]
6-
#![allow(unused_variables)]
5+
#![expect(unreachable_code)]
6+
#![expect(unused_variables)]
77

88
struct Foo;
99

0 commit comments

Comments
 (0)