2018-03-13 08:24:03 -05:00
|
|
|
// compile-flags: -C no-prepopulate-passes -Zshare-generics=yes
|
|
|
|
|
|
|
|
// Check that local generics are internalized if they are in the same CGU
|
|
|
|
|
2019-04-13 11:03:02 -05:00
|
|
|
// CHECK-LABEL: ; local_generics_in_exe_internalized::foo
|
|
|
|
// CHECK-NEXT: ; Function Attrs:
|
|
|
|
// CHECK-NEXT: define internal
|
2018-03-13 08:24:03 -05:00
|
|
|
pub fn foo<T>(x: T, y: T) -> (T, T) {
|
|
|
|
(x, y)
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let _ = foo(0u8, 1u8);
|
|
|
|
}
|