]> git.proxmox.com Git - rustc.git/blob - src/test/run-pass/issue-13507-2.rs
Imported Upstream version 1.0.0~beta
[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 // pretty-expanded FIXME #23616
14
15 #![feature(core)]
16
17 extern crate issue13507;
18 use issue13507::testtypes;
19
20 use std::any::TypeId;
21
22 pub fn type_ids() -> Vec<TypeId> {
23 let mut ids = vec!();
24 ids.push(TypeId::of::<testtypes::FooNil>());
25 ids.push(TypeId::of::<testtypes::FooBool>());
26 ids.push(TypeId::of::<testtypes::FooInt>());
27 ids.push(TypeId::of::<testtypes::FooUint>());
28 ids.push(TypeId::of::<testtypes::FooFloat>());
29 ids.push(TypeId::of::<testtypes::FooEnum>());
30 ids.push(TypeId::of::<testtypes::FooUniq>());
31 ids.push(TypeId::of::<testtypes::FooPtr>());
32 ids.push(TypeId::of::<&'static testtypes::FooTrait>());
33 ids.push(TypeId::of::<testtypes::FooStruct>());
34 ids.push(TypeId::of::<testtypes::FooTuple>());
35 ids
36 }
37
38 pub fn main() {
39 let othercrate = testtypes::type_ids();
40 let thiscrate = type_ids();
41 assert_eq!(thiscrate, othercrate);
42 }