2023-03-24 16:04:05 -05:00
|
|
|
// compile-flags:-Zprint-mono-items=eager -Zinline-mir=no
|
2015-11-02 07:46:39 -06:00
|
|
|
|
|
|
|
#![deny(dead_code)]
|
2017-12-22 08:31:51 -06:00
|
|
|
#![feature(start)]
|
2015-11-02 07:46:39 -06:00
|
|
|
|
|
|
|
fn foo1<T1>(a: T1) -> (T1, u32) {
|
|
|
|
(a, 1)
|
|
|
|
}
|
|
|
|
|
|
|
|
fn foo2<T1, T2>(a: T1, b: T2) -> (T1, T2) {
|
|
|
|
(a, b)
|
|
|
|
}
|
|
|
|
|
|
|
|
fn foo3<T1, T2, T3>(a: T1, b: T2, c: T3) -> (T1, T2, T3) {
|
|
|
|
(a, b, c)
|
|
|
|
}
|
|
|
|
|
|
|
|
// This function should be instantiated even if no used
|
2020-08-28 08:31:03 -05:00
|
|
|
//~ MONO_ITEM fn lifetime_only
|
2015-11-02 07:46:39 -06:00
|
|
|
pub fn lifetime_only<'a>(a: &'a u32) -> &'a u32 {
|
|
|
|
a
|
|
|
|
}
|
|
|
|
|
2020-08-28 08:31:03 -05:00
|
|
|
//~ MONO_ITEM fn start
|
2017-12-22 08:31:51 -06:00
|
|
|
#[start]
|
|
|
|
fn start(_: isize, _: *const *const u8) -> isize {
|
2020-08-28 08:31:03 -05:00
|
|
|
//~ MONO_ITEM fn foo1::<i32>
|
2015-11-02 07:46:39 -06:00
|
|
|
let _ = foo1(2i32);
|
2020-08-28 08:31:03 -05:00
|
|
|
//~ MONO_ITEM fn foo1::<i64>
|
2015-11-02 07:46:39 -06:00
|
|
|
let _ = foo1(2i64);
|
2020-08-28 08:31:03 -05:00
|
|
|
//~ MONO_ITEM fn foo1::<&str>
|
2015-11-02 07:46:39 -06:00
|
|
|
let _ = foo1("abc");
|
2020-08-28 08:31:03 -05:00
|
|
|
//~ MONO_ITEM fn foo1::<char>
|
2015-11-02 07:46:39 -06:00
|
|
|
let _ = foo1('v');
|
|
|
|
|
2020-08-28 08:31:03 -05:00
|
|
|
//~ MONO_ITEM fn foo2::<i32, i32>
|
2015-11-02 07:46:39 -06:00
|
|
|
let _ = foo2(2i32, 2i32);
|
2020-08-28 08:31:03 -05:00
|
|
|
//~ MONO_ITEM fn foo2::<i64, &str>
|
2015-11-02 07:46:39 -06:00
|
|
|
let _ = foo2(2i64, "abc");
|
2020-08-28 08:31:03 -05:00
|
|
|
//~ MONO_ITEM fn foo2::<&str, usize>
|
2015-11-02 07:46:39 -06:00
|
|
|
let _ = foo2("a", 2usize);
|
2020-08-28 08:31:03 -05:00
|
|
|
//~ MONO_ITEM fn foo2::<char, ()>
|
2015-11-02 07:46:39 -06:00
|
|
|
let _ = foo2('v', ());
|
|
|
|
|
2020-08-28 08:31:03 -05:00
|
|
|
//~ MONO_ITEM fn foo3::<i32, i32, i32>
|
2015-11-02 07:46:39 -06:00
|
|
|
let _ = foo3(2i32, 2i32, 2i32);
|
2020-08-28 08:31:03 -05:00
|
|
|
//~ MONO_ITEM fn foo3::<i64, &str, char>
|
2015-11-02 07:46:39 -06:00
|
|
|
let _ = foo3(2i64, "abc", 'c');
|
2020-08-28 08:31:03 -05:00
|
|
|
//~ MONO_ITEM fn foo3::<i16, &str, usize>
|
2015-11-02 07:46:39 -06:00
|
|
|
let _ = foo3(0i16, "a", 2usize);
|
2020-08-28 08:31:03 -05:00
|
|
|
//~ MONO_ITEM fn foo3::<char, (), ()>
|
2015-11-02 07:46:39 -06:00
|
|
|
let _ = foo3('v', (), ());
|
2017-12-22 08:31:51 -06:00
|
|
|
|
|
|
|
0
|
2015-11-02 07:46:39 -06:00
|
|
|
}
|