2021-04-03 11:05:11 +00:00
|
|
|
//
|
2020-10-17 00:00:00 +00:00
|
|
|
// compile-flags:-Zprint-mono-items=eager -Zinline-in-all-cgus -Zmir-opt-level=0
|
2015-11-02 13:46:39 +00:00
|
|
|
|
|
|
|
#![deny(dead_code)]
|
2017-12-22 14:31:51 +00:00
|
|
|
#![feature(start)]
|
2015-11-02 13:46:39 +00:00
|
|
|
|
|
|
|
trait Trait {
|
|
|
|
fn foo(&self) -> u32;
|
|
|
|
fn bar(&self);
|
|
|
|
}
|
|
|
|
|
|
|
|
struct Struct<T> {
|
|
|
|
_a: T
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<T> Trait for Struct<T> {
|
|
|
|
fn foo(&self) -> u32 { 0 }
|
|
|
|
fn bar(&self) {}
|
|
|
|
}
|
|
|
|
|
2020-08-28 13:31:03 +00:00
|
|
|
//~ MONO_ITEM fn start
|
2017-12-22 14:31:51 +00:00
|
|
|
#[start]
|
|
|
|
fn start(_: isize, _: *const *const u8) -> isize {
|
2015-11-02 13:46:39 +00:00
|
|
|
let s1 = Struct { _a: 0u32 };
|
|
|
|
|
2021-02-14 21:42:38 +00:00
|
|
|
//~ MONO_ITEM fn std::ptr::drop_in_place::<Struct<u32>> - shim(None) @@ instantiation_through_vtable-cgu.0[Internal]
|
2020-08-28 13:31:03 +00:00
|
|
|
//~ MONO_ITEM fn <Struct<u32> as Trait>::foo
|
|
|
|
//~ MONO_ITEM fn <Struct<u32> as Trait>::bar
|
2015-11-02 13:46:39 +00:00
|
|
|
let _ = &s1 as &Trait;
|
|
|
|
|
|
|
|
let s1 = Struct { _a: 0u64 };
|
2021-02-14 21:42:38 +00:00
|
|
|
//~ MONO_ITEM fn std::ptr::drop_in_place::<Struct<u64>> - shim(None) @@ instantiation_through_vtable-cgu.0[Internal]
|
2020-08-28 13:31:03 +00:00
|
|
|
//~ MONO_ITEM fn <Struct<u64> as Trait>::foo
|
|
|
|
//~ MONO_ITEM fn <Struct<u64> as Trait>::bar
|
2015-11-02 13:46:39 +00:00
|
|
|
let _ = &s1 as &Trait;
|
2017-12-22 14:31:51 +00:00
|
|
|
|
|
|
|
0
|
2015-11-02 13:46:39 +00:00
|
|
|
}
|