]> git.proxmox.com Git - rustc.git/blob - src/test/run-pass/deriving-global.rs
Imported Upstream version 1.8.0+dfsg1
[rustc.git] / src / test / run-pass / deriving-global.rs
1 // Copyright 2014 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 #![feature(rand, rustc_private)]
12
13 extern crate serialize;
14
15 mod submod {
16 // if any of these are implemented without global calls for any
17 // function calls, then being in a submodule will (correctly)
18 // cause errors about unrecognised module `std` (or `extra`)
19 #[derive(PartialEq, PartialOrd, Eq, Ord,
20 Hash,
21 Clone,
22 Debug,
23 Encodable, Decodable)]
24 enum A { A1(usize), A2(isize) }
25
26 #[derive(PartialEq, PartialOrd, Eq, Ord,
27 Hash,
28 Clone,
29 Debug,
30 Encodable, Decodable)]
31 struct B { x: usize, y: isize }
32
33 #[derive(PartialEq, PartialOrd, Eq, Ord,
34 Hash,
35 Clone,
36 Debug,
37 Encodable, Decodable)]
38 struct C(usize, isize);
39
40 }
41
42 pub fn main() {}