We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3e39e3e + e704561 commit 16f1a72Copy full SHA for 16f1a72
src/test/run-pass/issue-8498.rs
@@ -8,36 +8,28 @@
8
// option. This file may not be copied, modified, or distributed
9
// except according to those terms.
10
11
-// xfail-test
12
-
13
pub fn main() {
14
-// This is ok
15
match &[(~5,~7)] {
16
ps => {
17
let (ref y, _) = ps[0];
18
- println!("1. y = {}", **y);
19
assert!(**y == 5);
20
}
21
22
23
-// This is not entirely ok
24
match Some(&[(~5,)]) {
25
Some(ps) => {
26
let (ref y,) = ps[0];
27
- println!("2. y = {}", **y);
28
- if **y != 5 { println!("sadness"); }
+ assert!(**y == 5);
29
30
None => ()
31
32
33
-// This is not ok
34
match Some(&[(~5,~7)]) {
35
36
let (ref y, ref z) = ps[0];
37
- println!("3. y = {} z = {}", **y, **z);
38
+ assert!(**z == 7);
39
40
41
42
43
0 commit comments