]>
git.proxmox.com Git - rustc.git/blob - src/test/codegen-units/partitioning/auxiliary/shared_generics_aux.rs
1 // NOTE: We always compile this test with -Copt-level=0 because higher opt-levels
2 // prevent drop-glue from participating in share-generics.
3 // compile-flags:-Zshare-generics=yes -Copt-level=0
8 pub fn generic_fn
<T
>(x
: T
, y
: T
) -> (T
, T
) {
12 pub fn use_generic_fn_f32() -> (f32, f32) {
13 // This line causes drop glue for Foo to be instantiated. We want to make
14 // sure that this crate exports an instance to be re-used by share-generics.
17 generic_fn(0.0f32, 1.0f32)
20 pub struct Foo(pub u32);