Skip to content

Commit 214f977

Browse files
committed
Move uninhabited tests into subdirectory.
This commit just tries to tidy up a little.
1 parent 8838b91 commit 214f977

14 files changed

+16
-16
lines changed

src/test/ui/rfc-2008-non-exhaustive/uninhabited.stderr renamed to src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0308]: mismatched types
2-
--> $DIR/uninhabited.rs:23:5
2+
--> $DIR/coercions.rs:23:5
33
|
44
LL | fn cannot_coerce_empty_enum_to_anything(x: UninhabitedEnum) -> A {
55
| - expected `A` because of return type
@@ -10,7 +10,7 @@ LL | x
1010
found type `uninhabited::UninhabitedEnum`
1111

1212
error[E0308]: mismatched types
13-
--> $DIR/uninhabited.rs:27:5
13+
--> $DIR/coercions.rs:27:5
1414
|
1515
LL | fn cannot_coerce_empty_tuple_struct_to_anything(x: UninhabitedTupleStruct) -> A {
1616
| - expected `A` because of return type
@@ -21,7 +21,7 @@ LL | x
2121
found type `uninhabited::UninhabitedTupleStruct`
2222

2323
error[E0308]: mismatched types
24-
--> $DIR/uninhabited.rs:31:5
24+
--> $DIR/coercions.rs:31:5
2525
|
2626
LL | fn cannot_coerce_empty_struct_to_anything(x: UninhabitedStruct) -> A {
2727
| - expected `A` because of return type
@@ -32,7 +32,7 @@ LL | x
3232
found type `uninhabited::UninhabitedStruct`
3333

3434
error[E0308]: mismatched types
35-
--> $DIR/uninhabited.rs:35:5
35+
--> $DIR/coercions.rs:35:5
3636
|
3737
LL | fn cannot_coerce_enum_with_empty_variants_to_anything(x: UninhabitedVariants) -> A {
3838
| - expected `A` because of return type

src/test/ui/rfc-2008-non-exhaustive/uninhabited_same_crate.stderr renamed to src/test/ui/rfc-2008-non-exhaustive/uninhabited/coercions_same_crate.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0308]: mismatched types
2-
--> $DIR/uninhabited_same_crate.rs:31:5
2+
--> $DIR/coercions_same_crate.rs:31:5
33
|
44
LL | fn cannot_coerce_empty_enum_to_anything(x: UninhabitedEnum) -> A {
55
| - expected `A` because of return type
@@ -10,7 +10,7 @@ LL | x
1010
found type `UninhabitedEnum`
1111

1212
error[E0308]: mismatched types
13-
--> $DIR/uninhabited_same_crate.rs:35:5
13+
--> $DIR/coercions_same_crate.rs:35:5
1414
|
1515
LL | fn cannot_coerce_empty_tuple_struct_to_anything(x: UninhabitedTupleStruct) -> A {
1616
| - expected `A` because of return type
@@ -21,7 +21,7 @@ LL | x
2121
found type `UninhabitedTupleStruct`
2222

2323
error[E0308]: mismatched types
24-
--> $DIR/uninhabited_same_crate.rs:39:5
24+
--> $DIR/coercions_same_crate.rs:39:5
2525
|
2626
LL | fn cannot_coerce_empty_struct_to_anything(x: UninhabitedStruct) -> A {
2727
| - expected `A` because of return type
@@ -32,7 +32,7 @@ LL | x
3232
found type `UninhabitedStruct`
3333

3434
error[E0308]: mismatched types
35-
--> $DIR/uninhabited_same_crate.rs:43:5
35+
--> $DIR/coercions_same_crate.rs:43:5
3636
|
3737
LL | fn cannot_coerce_enum_with_empty_variants_to_anything(x: UninhabitedVariants) -> A {
3838
| - expected `A` because of return type

src/test/ui/rfc-2008-non-exhaustive/uninhabited_match.stderr renamed to src/test/ui/rfc-2008-non-exhaustive/uninhabited/match.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0004]: non-exhaustive patterns: type `uninhabited::UninhabitedEnum` is non-empty
2-
--> $DIR/uninhabited_match.rs:16:11
2+
--> $DIR/match.rs:16:11
33
|
44
LL | match x {}
55
| ^

src/test/ui/rfc-2008-non-exhaustive/uninhabited_match_with_exhaustive_patterns.stderr renamed to src/test/ui/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0004]: non-exhaustive patterns: type `uninhabited::UninhabitedEnum` is non-empty
2-
--> $DIR/uninhabited_match_with_exhaustive_patterns.rs:19:11
2+
--> $DIR/match_with_exhaustive_patterns.rs:19:11
33
|
44
LL | match x {}
55
| ^

src/test/ui/rfc-2008-non-exhaustive/uninhabited_patterns_same_crate.stderr renamed to src/test/ui/rfc-2008-non-exhaustive/uninhabited/patterns_same_crate.stderr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
error: unreachable pattern
2-
--> $DIR/uninhabited_patterns_same_crate.rs:53:9
2+
--> $DIR/patterns_same_crate.rs:53:9
33
|
44
LL | Some(_x) => (),
55
| ^^^^^^^^
66
|
77
note: lint level defined here
8-
--> $DIR/uninhabited_patterns_same_crate.rs:1:9
8+
--> $DIR/patterns_same_crate.rs:1:9
99
|
1010
LL | #![deny(unreachable_patterns)]
1111
| ^^^^^^^^^^^^^^^^^^^^
1212

1313
error: unreachable pattern
14-
--> $DIR/uninhabited_patterns_same_crate.rs:58:9
14+
--> $DIR/patterns_same_crate.rs:58:9
1515
|
1616
LL | Some(_x) => (),
1717
| ^^^^^^^^
1818

1919
error: unreachable pattern
20-
--> $DIR/uninhabited_patterns_same_crate.rs:62:15
20+
--> $DIR/patterns_same_crate.rs:62:15
2121
|
2222
LL | while let PartiallyInhabitedVariants::Struct { x } = partially_inhabited_variant() {
2323
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2424

2525
error: unreachable pattern
26-
--> $DIR/uninhabited_patterns_same_crate.rs:66:15
26+
--> $DIR/patterns_same_crate.rs:66:15
2727
|
2828
LL | while let Some(_x) = uninhabited_struct() {
2929
| ^^^^^^^^
3030

3131
error: unreachable pattern
32-
--> $DIR/uninhabited_patterns_same_crate.rs:69:15
32+
--> $DIR/patterns_same_crate.rs:69:15
3333
|
3434
LL | while let Some(_x) = uninhabited_tuple_struct() {
3535
| ^^^^^^^^

0 commit comments

Comments
 (0)