]> git.lizzy.rs Git - rust.git/blob - src/test/run-pass/xcrate-unit-struct.rs
xfail-fast an aux test
[rust.git] / src / test / run-pass / xcrate-unit-struct.rs
1 // Copyright 2013 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 // aux-build:xcrate_unit_struct.rs
12 // xfail-fast
13 extern mod xcrate_unit_struct;
14
15 use std::util;
16
17 static s1: xcrate_unit_struct::Struct = xcrate_unit_struct::Struct;
18 static s2: xcrate_unit_struct::Unit = xcrate_unit_struct::Unit;
19 static s3: xcrate_unit_struct::Unit =
20                 xcrate_unit_struct::Argument(xcrate_unit_struct::Struct);
21 static s4: xcrate_unit_struct::Unit = xcrate_unit_struct::Argument(s1);
22
23 fn f1(_: xcrate_unit_struct::Struct) {}
24 fn f2(_: xcrate_unit_struct::Unit) {}
25
26 fn main() {
27     f1(xcrate_unit_struct::Struct);
28     f2(xcrate_unit_struct::Unit);
29     f2(xcrate_unit_struct::Argument(xcrate_unit_struct::Struct));
30
31     f1(s1);
32     f2(s2);
33     f2(s3);
34     f2(s4);
35 }