2018-05-08 08:10:16 -05:00
|
|
|
// compile-flags:-Zprint-mono-items=eager
|
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
|
|
|
|
|
|
|
trait SomeTrait {
|
|
|
|
fn foo(&self);
|
|
|
|
}
|
|
|
|
|
|
|
|
// This function is never instantiated but the contained impl must still be
|
|
|
|
// discovered.
|
|
|
|
pub fn generic_function<T>(x: T) -> (T, i32) {
|
|
|
|
impl SomeTrait for i64 {
|
2020-08-28 08:31:03 -05:00
|
|
|
//~ MONO_ITEM fn generic_function::<impl SomeTrait for i64>::foo
|
2015-11-02 07:46:39 -06:00
|
|
|
fn foo(&self) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
(x, 0)
|
|
|
|
}
|
|
|
|
|
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 {
|
2015-11-02 07:46:39 -06:00
|
|
|
0i64.foo();
|
2017-12-22 08:31:51 -06:00
|
|
|
|
|
|
|
0
|
2015-11-02 07:46:39 -06:00
|
|
|
}
|