Skip to content

Commit 05dc864

Browse files
committed
Move type_alias_enum_variants tests to a folder; Strip feature gates.
1 parent e5060da commit 05dc864

19 files changed

+40
-59
lines changed

src/test/ui/pattern/enum-variant-generic-args.rs renamed to src/test/ui/type-alias-enum-variants/enum-variant-generic-args-pats-pass.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// run-pass
22

3-
#![feature(type_alias_enum_variants)]
4-
53
#![allow(irrefutable_let_patterns)]
64

75
#[allow(dead_code)]

src/test/ui/enum-variant-generic-args.rs renamed to src/test/ui/type-alias-enum-variants/enum-variant-generic-args.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(type_alias_enum_variants)]
2-
31
enum Enum<T> { TSVariant(T), SVariant { v: T } }
42
type Alias<T> = Enum<T>;
53
type AliasFixed = Enum<()>;

src/test/ui/enum-variant-generic-args.stderr renamed to src/test/ui/type-alias-enum-variants/enum-variant-generic-args.stderr

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0308]: mismatched types
2-
--> $DIR/enum-variant-generic-args.rs:9:25
2+
--> $DIR/enum-variant-generic-args.rs:7:25
33
|
44
LL | Self::TSVariant(());
55
| ^^ expected type parameter, found ()
@@ -8,19 +8,19 @@ LL | Self::TSVariant(());
88
found type `()`
99

1010
error[E0109]: type arguments are not allowed for this type
11-
--> $DIR/enum-variant-generic-args.rs:11:27
11+
--> $DIR/enum-variant-generic-args.rs:9:27
1212
|
1313
LL | Self::TSVariant::<()>(());
1414
| ^^ type argument not allowed
1515

1616
error[E0109]: type arguments are not allowed for this type
17-
--> $DIR/enum-variant-generic-args.rs:13:16
17+
--> $DIR/enum-variant-generic-args.rs:11:16
1818
|
1919
LL | Self::<()>::TSVariant(());
2020
| ^^ type argument not allowed
2121

2222
error[E0308]: mismatched types
23-
--> $DIR/enum-variant-generic-args.rs:13:31
23+
--> $DIR/enum-variant-generic-args.rs:11:31
2424
|
2525
LL | Self::<()>::TSVariant(());
2626
| ^^ expected type parameter, found ()
@@ -29,19 +29,19 @@ LL | Self::<()>::TSVariant(());
2929
found type `()`
3030

3131
error[E0109]: type arguments are not allowed for this type
32-
--> $DIR/enum-variant-generic-args.rs:16:16
32+
--> $DIR/enum-variant-generic-args.rs:14:16
3333
|
3434
LL | Self::<()>::TSVariant::<()>(());
3535
| ^^ type argument not allowed
3636

3737
error[E0109]: type arguments are not allowed for this type
38-
--> $DIR/enum-variant-generic-args.rs:16:33
38+
--> $DIR/enum-variant-generic-args.rs:14:33
3939
|
4040
LL | Self::<()>::TSVariant::<()>(());
4141
| ^^ type argument not allowed
4242

4343
error[E0308]: mismatched types
44-
--> $DIR/enum-variant-generic-args.rs:22:29
44+
--> $DIR/enum-variant-generic-args.rs:20:29
4545
|
4646
LL | Self::SVariant { v: () };
4747
| ^^ expected type parameter, found ()
@@ -50,13 +50,13 @@ LL | Self::SVariant { v: () };
5050
found type `()`
5151

5252
error[E0109]: type arguments are not allowed for this type
53-
--> $DIR/enum-variant-generic-args.rs:24:26
53+
--> $DIR/enum-variant-generic-args.rs:22:26
5454
|
5555
LL | Self::SVariant::<()> { v: () };
5656
| ^^ type argument not allowed
5757

5858
error[E0308]: mismatched types
59-
--> $DIR/enum-variant-generic-args.rs:24:35
59+
--> $DIR/enum-variant-generic-args.rs:22:35
6060
|
6161
LL | Self::SVariant::<()> { v: () };
6262
| ^^ expected type parameter, found ()
@@ -65,13 +65,13 @@ LL | Self::SVariant::<()> { v: () };
6565
found type `()`
6666

6767
error[E0109]: type arguments are not allowed for this type
68-
--> $DIR/enum-variant-generic-args.rs:27:16
68+
--> $DIR/enum-variant-generic-args.rs:25:16
6969
|
7070
LL | Self::<()>::SVariant { v: () };
7171
| ^^ type argument not allowed
7272

7373
error[E0308]: mismatched types
74-
--> $DIR/enum-variant-generic-args.rs:27:35
74+
--> $DIR/enum-variant-generic-args.rs:25:35
7575
|
7676
LL | Self::<()>::SVariant { v: () };
7777
| ^^ expected type parameter, found ()
@@ -80,19 +80,19 @@ LL | Self::<()>::SVariant { v: () };
8080
found type `()`
8181

8282
error[E0109]: type arguments are not allowed for this type
83-
--> $DIR/enum-variant-generic-args.rs:30:16
83+
--> $DIR/enum-variant-generic-args.rs:28:16
8484
|
8585
LL | Self::<()>::SVariant::<()> { v: () };
8686
| ^^ type argument not allowed
8787

8888
error[E0109]: type arguments are not allowed for this type
89-
--> $DIR/enum-variant-generic-args.rs:30:32
89+
--> $DIR/enum-variant-generic-args.rs:28:32
9090
|
9191
LL | Self::<()>::SVariant::<()> { v: () };
9292
| ^^ type argument not allowed
9393

9494
error[E0308]: mismatched types
95-
--> $DIR/enum-variant-generic-args.rs:30:41
95+
--> $DIR/enum-variant-generic-args.rs:28:41
9696
|
9797
LL | Self::<()>::SVariant::<()> { v: () };
9898
| ^^ expected type parameter, found ()
@@ -101,85 +101,85 @@ LL | Self::<()>::SVariant::<()> { v: () };
101101
found type `()`
102102

103103
error[E0109]: type arguments are not allowed for this type
104-
--> $DIR/enum-variant-generic-args.rs:40:29
104+
--> $DIR/enum-variant-generic-args.rs:38:29
105105
|
106106
LL | Enum::<()>::TSVariant::<()>(());
107107
| ^^ type argument not allowed
108108

109109
error[E0109]: type arguments are not allowed for this type
110-
--> $DIR/enum-variant-generic-args.rs:43:24
110+
--> $DIR/enum-variant-generic-args.rs:41:24
111111
|
112112
LL | Alias::TSVariant::<()>(());
113113
| ^^ type argument not allowed
114114

115115
error[E0109]: type arguments are not allowed for this type
116-
--> $DIR/enum-variant-generic-args.rs:45:30
116+
--> $DIR/enum-variant-generic-args.rs:43:30
117117
|
118118
LL | Alias::<()>::TSVariant::<()>(());
119119
| ^^ type argument not allowed
120120

121121
error[E0109]: type arguments are not allowed for this type
122-
--> $DIR/enum-variant-generic-args.rs:48:29
122+
--> $DIR/enum-variant-generic-args.rs:46:29
123123
|
124124
LL | AliasFixed::TSVariant::<()>(());
125125
| ^^ type argument not allowed
126126

127127
error[E0107]: wrong number of type arguments: expected 0, found 1
128-
--> $DIR/enum-variant-generic-args.rs:50:18
128+
--> $DIR/enum-variant-generic-args.rs:48:18
129129
|
130130
LL | AliasFixed::<()>::TSVariant(());
131131
| ^^ unexpected type argument
132132

133133
error[E0107]: wrong number of type arguments: expected 0, found 1
134-
--> $DIR/enum-variant-generic-args.rs:52:18
134+
--> $DIR/enum-variant-generic-args.rs:50:18
135135
|
136136
LL | AliasFixed::<()>::TSVariant::<()>(());
137137
| ^^ unexpected type argument
138138

139139
error[E0109]: type arguments are not allowed for this type
140-
--> $DIR/enum-variant-generic-args.rs:52:35
140+
--> $DIR/enum-variant-generic-args.rs:50:35
141141
|
142142
LL | AliasFixed::<()>::TSVariant::<()>(());
143143
| ^^ type argument not allowed
144144

145145
error[E0109]: type arguments are not allowed for this type
146-
--> $DIR/enum-variant-generic-args.rs:58:28
146+
--> $DIR/enum-variant-generic-args.rs:56:28
147147
|
148148
LL | Enum::<()>::SVariant::<()> { v: () };
149149
| ^^ type argument not allowed
150150

151151
error[E0109]: type arguments are not allowed for this type
152-
--> $DIR/enum-variant-generic-args.rs:61:23
152+
--> $DIR/enum-variant-generic-args.rs:59:23
153153
|
154154
LL | Alias::SVariant::<()> { v: () };
155155
| ^^ type argument not allowed
156156

157157
error[E0109]: type arguments are not allowed for this type
158-
--> $DIR/enum-variant-generic-args.rs:63:29
158+
--> $DIR/enum-variant-generic-args.rs:61:29
159159
|
160160
LL | Alias::<()>::SVariant::<()> { v: () };
161161
| ^^ type argument not allowed
162162

163163
error[E0109]: type arguments are not allowed for this type
164-
--> $DIR/enum-variant-generic-args.rs:66:28
164+
--> $DIR/enum-variant-generic-args.rs:64:28
165165
|
166166
LL | AliasFixed::SVariant::<()> { v: () };
167167
| ^^ type argument not allowed
168168

169169
error[E0107]: wrong number of type arguments: expected 0, found 1
170-
--> $DIR/enum-variant-generic-args.rs:68:18
170+
--> $DIR/enum-variant-generic-args.rs:66:18
171171
|
172172
LL | AliasFixed::<()>::SVariant { v: () };
173173
| ^^ unexpected type argument
174174

175175
error[E0107]: wrong number of type arguments: expected 0, found 1
176-
--> $DIR/enum-variant-generic-args.rs:70:18
176+
--> $DIR/enum-variant-generic-args.rs:68:18
177177
|
178178
LL | AliasFixed::<()>::SVariant::<()> { v: () };
179179
| ^^ unexpected type argument
180180

181181
error[E0109]: type arguments are not allowed for this type
182-
--> $DIR/enum-variant-generic-args.rs:70:34
182+
--> $DIR/enum-variant-generic-args.rs:68:34
183183
|
184184
LL | AliasFixed::<()>::SVariant::<()> { v: () };
185185
| ^^ type argument not allowed

src/test/ui/issues/issue-57866.rs renamed to src/test/ui/type-alias-enum-variants/issue-57866.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// compile-pass
22

3-
#![feature(type_alias_enum_variants)]
4-
53
enum Outer<T> {
64
A(T)
75
}

src/test/ui/issues/issue-58006.rs renamed to src/test/ui/type-alias-enum-variants/issue-58006.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#![feature(type_alias_enum_variants)]
21
pub enum Enum {
32
A(usize),
43
}

src/test/ui/issues/issue-58006.stderr renamed to src/test/ui/type-alias-enum-variants/issue-58006.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0533]: expected unit struct/variant or constant, found tuple variant `<Self>::A`
2-
--> $DIR/issue-58006.rs:9:13
2+
--> $DIR/issue-58006.rs:8:13
33
|
44
LL | Self::A => (),
55
| ^^^^^^^

src/test/ui/type-alias-enum-variants/issue-61801-path-pattern-can-infer.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33

44
// compile-pass
55

6-
#![feature(type_alias_enum_variants)]
7-
86
enum Opt<T> {
97
N,
108
S(T),

src/test/ui/type-alias-enum-variants-panic.rs renamed to src/test/ui/type-alias-enum-variants/type-alias-enum-variants-panic.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// ignore-tidy-linelength
22

3-
#![feature(type_alias_enum_variants)]
4-
53
#![allow(unreachable_code)]
64

75
enum Enum { Variant {} }

src/test/ui/type-alias-enum-variants-panic.stderr renamed to src/test/ui/type-alias-enum-variants/type-alias-enum-variants-panic.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
error[E0533]: expected unit struct/variant or constant, found struct variant `<Alias>::Variant`
2-
--> $DIR/type-alias-enum-variants-panic.rs:11:5
2+
--> $DIR/type-alias-enum-variants-panic.rs:9:5
33
|
44
LL | Alias::Variant;
55
| ^^^^^^^^^^^^^^
66

77
error[E0533]: expected unit struct/variant or constant, found struct variant `<Alias>::Variant`
8-
--> $DIR/type-alias-enum-variants-panic.rs:13:9
8+
--> $DIR/type-alias-enum-variants-panic.rs:11:9
99
|
1010
LL | let Alias::Variant = panic!();
1111
| ^^^^^^^^^^^^^^
1212

1313
error[E0164]: expected tuple struct/variant, found struct variant `<Alias>::Variant`
14-
--> $DIR/type-alias-enum-variants-panic.rs:15:9
14+
--> $DIR/type-alias-enum-variants-panic.rs:13:9
1515
|
1616
LL | let Alias::Variant(..) = panic!();
1717
| ^^^^^^^^^^^^^^^^^^ not a tuple variant or struct

src/test/run-pass/type-alias-enum-variants-2.rs renamed to src/test/ui/type-alias-enum-variants/type-alias-enum-variants-pass-2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(type_alias_enum_variants)]
1+
// run-pass
22

33
#[derive(Debug, PartialEq, Eq)]
44
enum Foo {

0 commit comments

Comments
 (0)