summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/target/issue-3029.rs
blob: a7ac5c32b066f3380cf35610d44075412f17f0e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
fn keep_if() {
    {
        {
            {
                EvaluateJSReply::NumberValue(
                    if FromJSValConvertible::from_jsval(cx, rval.handle(), ()) {
                        unimplemented!();
                    },
                )
            }
        }
    }
}

fn keep_if_let() {
    {
        {
            {
                EvaluateJSReply::NumberValue(
                    if let Some(e) = FromJSValConvertible::from_jsval(cx, rval.handle(), ()) {
                        unimplemented!();
                    },
                )
            }
        }
    }
}

fn keep_for() {
    {
        {
            {
                EvaluateJSReply::NumberValue(
                    for conv in FromJSValConvertible::from_jsval(cx, rval.handle(), ()) {
                        unimplemented!();
                    },
                )
            }
        }
    }
}

fn keep_loop() {
    {
        {
            {
                EvaluateJSReply::NumberValue(loop {
                    FromJSValConvertible::from_jsval(cx, rval.handle(), ());
                })
            }
        }
    }
}

fn keep_while() {
    {
        {
            {
                EvaluateJSReply::NumberValue(
                    while FromJSValConvertible::from_jsval(cx, rval.handle(), ()) {
                        unimplemented!();
                    },
                )
            }
        }
    }
}

fn keep_while_let() {
    {
        {
            {
                EvaluateJSReply::NumberValue(
                    while let Some(e) = FromJSValConvertible::from_jsval(cx, rval.handle(), ()) {
                        unimplemented!();
                    },
                )
            }
        }
    }
}

fn keep_match() {
    {
        {
            EvaluateJSReply::NumberValue(
                match FromJSValConvertible::from_jsval(cx, rval.handle(), ()) {
                    Ok(ConversionResult::Success(v)) => v,
                    _ => unreachable!(),
                },
            )
        }
    }
}