1 // compile-flags:-Zprint-mono-items=eager
6 // This test asserts that no codegen items are generated for generic items that
7 // are never instantiated in the local crate.
14 pub fn foo<T: Copy>(x: T) -> (T, T) {
18 pub struct Struct<T> {
23 pub fn foo(self) -> T {
36 pub fn foo(self) -> T {
46 pub struct TupleStruct<T>(T);
48 impl<T> TupleStruct<T> {
49 pub fn foo(self) -> T {
56 pub type Pair<T> = (T, T);
58 pub struct NonGeneric {
63 pub fn foo(self) -> i32 {
67 pub fn generic_foo<T>(&self, x: T) -> (T, i32) {
71 pub fn generic_bar<T: Copy>(x: T) -> (T, T) {
76 // Only the non-generic methods should be instantiated:
77 //~ MONO_ITEM fn NonGeneric::foo