Move uninhabited tests into subdirectory.
This commit just tries to tidy up a little.
This commit is contained in:
parent
8838b9130e
commit
214f977fee
@ -1,5 +1,5 @@
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/uninhabited.rs:23:5
|
||||
--> $DIR/coercions.rs:23:5
|
||||
|
|
||||
LL | fn cannot_coerce_empty_enum_to_anything(x: UninhabitedEnum) -> A {
|
||||
| - expected `A` because of return type
|
||||
@ -10,7 +10,7 @@ LL | x
|
||||
found type `uninhabited::UninhabitedEnum`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/uninhabited.rs:27:5
|
||||
--> $DIR/coercions.rs:27:5
|
||||
|
|
||||
LL | fn cannot_coerce_empty_tuple_struct_to_anything(x: UninhabitedTupleStruct) -> A {
|
||||
| - expected `A` because of return type
|
||||
@ -21,7 +21,7 @@ LL | x
|
||||
found type `uninhabited::UninhabitedTupleStruct`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/uninhabited.rs:31:5
|
||||
--> $DIR/coercions.rs:31:5
|
||||
|
|
||||
LL | fn cannot_coerce_empty_struct_to_anything(x: UninhabitedStruct) -> A {
|
||||
| - expected `A` because of return type
|
||||
@ -32,7 +32,7 @@ LL | x
|
||||
found type `uninhabited::UninhabitedStruct`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/uninhabited.rs:35:5
|
||||
--> $DIR/coercions.rs:35:5
|
||||
|
|
||||
LL | fn cannot_coerce_enum_with_empty_variants_to_anything(x: UninhabitedVariants) -> A {
|
||||
| - expected `A` because of return type
|
@ -1,5 +1,5 @@
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/uninhabited_same_crate.rs:31:5
|
||||
--> $DIR/coercions_same_crate.rs:31:5
|
||||
|
|
||||
LL | fn cannot_coerce_empty_enum_to_anything(x: UninhabitedEnum) -> A {
|
||||
| - expected `A` because of return type
|
||||
@ -10,7 +10,7 @@ LL | x
|
||||
found type `UninhabitedEnum`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/uninhabited_same_crate.rs:35:5
|
||||
--> $DIR/coercions_same_crate.rs:35:5
|
||||
|
|
||||
LL | fn cannot_coerce_empty_tuple_struct_to_anything(x: UninhabitedTupleStruct) -> A {
|
||||
| - expected `A` because of return type
|
||||
@ -21,7 +21,7 @@ LL | x
|
||||
found type `UninhabitedTupleStruct`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/uninhabited_same_crate.rs:39:5
|
||||
--> $DIR/coercions_same_crate.rs:39:5
|
||||
|
|
||||
LL | fn cannot_coerce_empty_struct_to_anything(x: UninhabitedStruct) -> A {
|
||||
| - expected `A` because of return type
|
||||
@ -32,7 +32,7 @@ LL | x
|
||||
found type `UninhabitedStruct`
|
||||
|
||||
error[E0308]: mismatched types
|
||||
--> $DIR/uninhabited_same_crate.rs:43:5
|
||||
--> $DIR/coercions_same_crate.rs:43:5
|
||||
|
|
||||
LL | fn cannot_coerce_enum_with_empty_variants_to_anything(x: UninhabitedVariants) -> A {
|
||||
| - expected `A` because of return type
|
@ -1,5 +1,5 @@
|
||||
error[E0004]: non-exhaustive patterns: type `uninhabited::UninhabitedEnum` is non-empty
|
||||
--> $DIR/uninhabited_match.rs:16:11
|
||||
--> $DIR/match.rs:16:11
|
||||
|
|
||||
LL | match x {}
|
||||
| ^
|
@ -1,5 +1,5 @@
|
||||
error[E0004]: non-exhaustive patterns: type `uninhabited::UninhabitedEnum` is non-empty
|
||||
--> $DIR/uninhabited_match_with_exhaustive_patterns.rs:19:11
|
||||
--> $DIR/match_with_exhaustive_patterns.rs:19:11
|
||||
|
|
||||
LL | match x {}
|
||||
| ^
|
@ -1,35 +1,35 @@
|
||||
error: unreachable pattern
|
||||
--> $DIR/uninhabited_patterns_same_crate.rs:53:9
|
||||
--> $DIR/patterns_same_crate.rs:53:9
|
||||
|
|
||||
LL | Some(_x) => (),
|
||||
| ^^^^^^^^
|
||||
|
|
||||
note: lint level defined here
|
||||
--> $DIR/uninhabited_patterns_same_crate.rs:1:9
|
||||
--> $DIR/patterns_same_crate.rs:1:9
|
||||
|
|
||||
LL | #![deny(unreachable_patterns)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: unreachable pattern
|
||||
--> $DIR/uninhabited_patterns_same_crate.rs:58:9
|
||||
--> $DIR/patterns_same_crate.rs:58:9
|
||||
|
|
||||
LL | Some(_x) => (),
|
||||
| ^^^^^^^^
|
||||
|
||||
error: unreachable pattern
|
||||
--> $DIR/uninhabited_patterns_same_crate.rs:62:15
|
||||
--> $DIR/patterns_same_crate.rs:62:15
|
||||
|
|
||||
LL | while let PartiallyInhabitedVariants::Struct { x } = partially_inhabited_variant() {
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: unreachable pattern
|
||||
--> $DIR/uninhabited_patterns_same_crate.rs:66:15
|
||||
--> $DIR/patterns_same_crate.rs:66:15
|
||||
|
|
||||
LL | while let Some(_x) = uninhabited_struct() {
|
||||
| ^^^^^^^^
|
||||
|
||||
error: unreachable pattern
|
||||
--> $DIR/uninhabited_patterns_same_crate.rs:69:15
|
||||
--> $DIR/patterns_same_crate.rs:69:15
|
||||
|
|
||||
LL | while let Some(_x) = uninhabited_tuple_struct() {
|
||||
| ^^^^^^^^
|
Loading…
x
Reference in New Issue
Block a user