]> git.lizzy.rs Git - rust.git/blob - src/test/run-pass/issue-29092.rs
Rollup merge of #53545 - FelixMcFelix:fix-50865-beta, r=petrochenkov
[rust.git] / src / test / run-pass / issue-29092.rs
1 // Copyright 2012-2016 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 // Regression test for Issue #29092.
12 //
13 // (Possibly redundant with regression test run-pass/issue-30530.rs)
14
15 use self::Term::*;
16
17 #[derive(Clone)]
18 pub enum Term {
19     Dummy,
20     A(Box<Term>),
21     B(Box<Term>),
22 }
23
24 // a small-step evaluator
25 pub fn small_eval(v: Term) -> Term {
26     match v {
27         A(t) => *t.clone(),
28         B(t) => *t.clone(),
29         _ => Dummy,
30     }
31 }
32
33 fn main() {
34     small_eval(Dummy);
35 }