]> git.proxmox.com Git - rustc.git/blame - src/test/codegen-units/cross-crate-generic-functions.rs
Imported Upstream version 1.9.0+dfsg1
[rustc.git] / src / test / codegen-units / cross-crate-generic-functions.rs
CommitLineData
7453a54e
SL
1// Copyright 2012-2015 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// ignore-tidy-linelength
12// compile-flags:-Zprint-trans-items=eager
13
14#![deny(dead_code)]
15
16// aux-build:cgu_generic_function.rs
17extern crate cgu_generic_function;
18
19//~ TRANS_ITEM fn cross_crate_generic_functions::main[0]
20fn main()
21{
54a0048b
SL
22 //~ TRANS_ITEM fn cgu_generic_function::bar[0]<u32>
23 //~ TRANS_ITEM fn cgu_generic_function::foo[0]<u32>
7453a54e
SL
24 let _ = cgu_generic_function::foo(1u32);
25
54a0048b
SL
26 //~ TRANS_ITEM fn cgu_generic_function::bar[0]<u64>
27 //~ TRANS_ITEM fn cgu_generic_function::foo[0]<u64>
7453a54e
SL
28 let _ = cgu_generic_function::foo(2u64);
29
30 // This should not introduce a codegen item
31 let _ = cgu_generic_function::exported_but_not_generic(3);
32}
33
34//~ TRANS_ITEM drop-glue i8