]> git.lizzy.rs Git - rust.git/blob - src/test/codegen-units/partitioning/shared-generics.rs
Auto merge of #53877 - withoutboats:compositional-pin, r=aturon
[rust.git] / src / test / codegen-units / partitioning / shared-generics.rs
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-mono-items=eager -Zshare-generics=yes -Zincremental=tmp/partitioning-tests/shared-generics-exe
13
14 #![crate_type="rlib"]
15
16 // aux-build:shared_generics_aux.rs
17 extern crate shared_generics_aux;
18
19 //~ MONO_ITEM fn shared_generics::foo[0]
20 pub fn foo() {
21
22     //~ MONO_ITEM fn shared_generics_aux::generic_fn[0]<u16> @@ shared_generics_aux-in-shared_generics.volatile[External]
23     let _ = shared_generics_aux::generic_fn(0u16, 1u16);
24
25     // This should not generate a monomorphization because it's already
26     // available in `shared_generics_aux`.
27     let _ = shared_generics_aux::generic_fn(0.0f32, 3.0f32);
28 }
29
30 // MONO_ITEM drop-glue i8