We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 76a7772 commit 7dfb9edCopy full SHA for 7dfb9ed
tests/ui/pattern/issue-110508.rs
@@ -0,0 +1,38 @@
1
+// run-pass
2
+
3
+#[derive(PartialEq, Eq)]
4
+pub enum Foo {
5
+ FooA(()),
6
+ FooB(Vec<()>),
7
+}
8
9
+impl Foo {
10
+ const A1: Foo = Foo::FooA(());
11
+ const A2: Foo = Self::FooA(());
12
+ const A3: Self = Foo::FooA(());
13
+ const A4: Self = Self::FooA(());
14
15
16
+fn main() {
17
+ let foo = Foo::FooA(());
18
19
+ match foo {
20
+ Foo::A1 => {},
21
+ _ => {},
22
+ }
23
24
25
+ Foo::A2 => {},
26
27
28
29
30
+ Foo::A3 => {},
31
32
33
34
35
+ Foo::A4 => {},
36
37
38
0 commit comments