]> git.lizzy.rs Git - rust.git/blob - src/test/run-pass/issue-13507-2.rs
Merge branch 'master' into cfg_tmp_dir
[rust.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 extern crate issue13507;
13 use issue13507::testtypes;
14
15 use std::intrinsics::TypeId;
16
17 pub fn type_ids() -> Vec<TypeId> {
18     let mut ids = vec!();
19     ids.push(TypeId::of::<testtypes::FooNil>());
20     ids.push(TypeId::of::<testtypes::FooBool>());
21     ids.push(TypeId::of::<testtypes::FooInt>());
22     ids.push(TypeId::of::<testtypes::FooUint>());
23     ids.push(TypeId::of::<testtypes::FooFloat>());
24     ids.push(TypeId::of::<testtypes::FooEnum>());
25     ids.push(TypeId::of::<testtypes::FooUniq>());
26     ids.push(TypeId::of::<testtypes::FooPtr>());
27     ids.push(TypeId::of::<testtypes::FooClosure>());
28     ids.push(TypeId::of::<&'static testtypes::FooTrait>());
29     ids.push(TypeId::of::<testtypes::FooStruct>());
30     ids.push(TypeId::of::<testtypes::FooTuple>());
31     ids
32 }
33
34 pub fn main() {
35     let othercrate = testtypes::type_ids();
36     let thiscrate = type_ids();
37     assert_eq!(thiscrate, othercrate);
38 }