Skip to content

Commit d3a7bdd

Browse files
committed
---
yaml --- r: 13635 b: refs/heads/master c: 0fe9c0a h: refs/heads/master i: 13633: 3d0592d 13631: 4849b1e v: v3
1 parent 8b48c8b commit d3a7bdd

File tree

3 files changed

+33
-1
lines changed

3 files changed

+33
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: abfa8164cd9d64e95039019eb9b4c3fdec2685c5
2+
refs/heads/master: 0fe9c0a9d11e64f556fcdee8296d7ae43c7fcd35
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
fn main() {
2+
enum color {
3+
rgb(uint, uint, uint),
4+
cmyk(uint, uint, uint, uint),
5+
no_color,
6+
}
7+
8+
fn foo(c: color) {
9+
alt c {
10+
rgb(_, _, _) { }
11+
cmyk(_, _, _, _) { }
12+
no_color(_) { }
13+
//!^ ERROR this pattern has 1 field, but the corresponding variant has no fields
14+
}
15+
}
16+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
fn main() {
2+
enum color {
3+
rgb(uint, uint, uint),
4+
cmyk(uint, uint, uint, uint),
5+
no_color,
6+
}
7+
8+
fn foo(c: color) {
9+
alt c {
10+
rgb(_, _) { }
11+
//!^ ERROR this pattern has 2 fields, but the corresponding variant has 3 fields
12+
cmyk(_, _, _, _) { }
13+
no_color { }
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)