]> git.lizzy.rs Git - rust.git/blob - tests/codegen/local-generics-in-exe-internalized.rs
Auto merge of #107778 - weihanglo:update-cargo, r=weihanglo
[rust.git] / tests / codegen / local-generics-in-exe-internalized.rs
1 // compile-flags: -C no-prepopulate-passes -Zshare-generics=yes
2
3 // Check that local generics are internalized if they are in the same CGU
4
5 // CHECK-LABEL: ; local_generics_in_exe_internalized::foo
6 // CHECK-NEXT: ; Function Attrs:
7 // CHECK-NEXT: define internal
8 pub fn foo<T>(x: T, y: T) -> (T, T) {
9     (x, y)
10 }
11
12 fn main() {
13     let _ = foo(0u8, 1u8);
14 }