]> git.proxmox.com Git - rustc.git/blame - src/test/run-pass/issue-13507-2.rs
New upstream version 1.23.0+dfsg1
[rustc.git] / src / test / run-pass / issue-13507-2.rs
CommitLineData
1a4d82fc
JJ
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
c34b1796 12
1a4d82fc
JJ
13extern crate issue13507;
14use issue13507::testtypes;
15
85aaf69f 16use std::any::TypeId;
1a4d82fc
JJ
17
18pub fn type_ids() -> Vec<TypeId> {
54a0048b
SL
19 use issue13507::testtypes::*;
20 vec![
21 TypeId::of::<FooBool>(),
22 TypeId::of::<FooInt>(),
23 TypeId::of::<FooUint>(),
24 TypeId::of::<FooFloat>(),
25 TypeId::of::<FooStr>(),
26 TypeId::of::<FooArray>(),
27 TypeId::of::<FooSlice>(),
28 TypeId::of::<FooBox>(),
29 TypeId::of::<FooPtr>(),
30 TypeId::of::<FooRef>(),
31 TypeId::of::<FooFnPtr>(),
32 TypeId::of::<FooNil>(),
33 TypeId::of::<FooTuple>(),
34 TypeId::of::<FooTrait>(),
35 TypeId::of::<FooStruct>(),
36 TypeId::of::<FooEnum>()
37 ]
1a4d82fc
JJ
38}
39
40pub fn main() {
54a0048b 41 let othercrate = issue13507::testtypes::type_ids();
1a4d82fc
JJ
42 let thiscrate = type_ids();
43 assert_eq!(thiscrate, othercrate);
44}