]> git.proxmox.com Git - rustc.git/blob - src/test/run-pass/issue-13507-2.rs
Imported Upstream version 1.9.0+dfsg1
[rustc.git] / src / test / run-pass / issue-13507-2.rs
1 // Copyright 2012-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 // aux-build:issue13507.rs
12
13
14 #![feature(core)]
15
16 extern crate issue13507;
17 use issue13507::testtypes;
18
19 use std::any::TypeId;
20
21 pub fn type_ids() -> Vec<TypeId> {
22 use issue13507::testtypes::*;
23 vec![
24 TypeId::of::<FooBool>(),
25 TypeId::of::<FooInt>(),
26 TypeId::of::<FooUint>(),
27 TypeId::of::<FooFloat>(),
28 TypeId::of::<FooStr>(),
29 TypeId::of::<FooArray>(),
30 TypeId::of::<FooSlice>(),
31 TypeId::of::<FooBox>(),
32 TypeId::of::<FooPtr>(),
33 TypeId::of::<FooRef>(),
34 TypeId::of::<FooFnPtr>(),
35 TypeId::of::<FooNil>(),
36 TypeId::of::<FooTuple>(),
37 TypeId::of::<FooTrait>(),
38 TypeId::of::<FooStruct>(),
39 TypeId::of::<FooEnum>()
40 ]
41 }
42
43 pub fn main() {
44 let othercrate = issue13507::testtypes::type_ids();
45 let thiscrate = type_ids();
46 assert_eq!(thiscrate, othercrate);
47 }