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
|
|
|
|
2020-08-28 08:31:03 -05:00
|
|
|
//~ MONO_ITEM fn foo
|
2015-11-02 07:46:39 -06:00
|
|
|
fn foo() {
|
|
|
|
{
|
2020-08-28 08:31:03 -05:00
|
|
|
//~ MONO_ITEM fn foo::foo
|
2015-11-02 07:46:39 -06:00
|
|
|
fn foo() {}
|
|
|
|
foo();
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
2020-08-28 08:31:03 -05:00
|
|
|
//~ MONO_ITEM fn foo::foo
|
2015-11-02 07:46:39 -06:00
|
|
|
fn foo() {}
|
|
|
|
foo();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-08-28 08:31:03 -05:00
|
|
|
//~ MONO_ITEM fn bar
|
2015-11-02 07:46:39 -06:00
|
|
|
fn bar() {
|
2020-08-28 08:31:03 -05:00
|
|
|
//~ MONO_ITEM fn bar::baz
|
2015-11-02 07:46:39 -06:00
|
|
|
fn baz() {}
|
|
|
|
baz();
|
|
|
|
}
|
|
|
|
|
|
|
|
struct Struct { _x: i32 }
|
|
|
|
|
|
|
|
impl Struct {
|
2020-08-28 08:31:03 -05:00
|
|
|
//~ MONO_ITEM fn Struct::foo
|
2015-11-02 07:46:39 -06:00
|
|
|
fn foo() {
|
|
|
|
{
|
2020-08-28 08:31:03 -05:00
|
|
|
//~ MONO_ITEM fn Struct::foo::foo
|
2015-11-02 07:46:39 -06:00
|
|
|
fn foo() {}
|
|
|
|
foo();
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
2020-08-28 08:31:03 -05:00
|
|
|
//~ MONO_ITEM fn Struct::foo::foo
|
2015-11-02 07:46:39 -06:00
|
|
|
fn foo() {}
|
|
|
|
foo();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-08-28 08:31:03 -05:00
|
|
|
//~ MONO_ITEM fn Struct::bar
|
2015-11-02 07:46:39 -06:00
|
|
|
fn bar(&self) {
|
|
|
|
{
|
2020-08-28 08:31:03 -05:00
|
|
|
//~ MONO_ITEM fn Struct::bar::foo
|
2015-11-02 07:46:39 -06:00
|
|
|
fn foo() {}
|
|
|
|
foo();
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
2020-08-28 08:31:03 -05:00
|
|
|
//~ MONO_ITEM fn Struct::bar::foo
|
2015-11-02 07:46:39 -06:00
|
|
|
fn foo() {}
|
|
|
|
foo();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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
|
|
|
foo();
|
|
|
|
bar();
|
|
|
|
Struct::foo();
|
|
|
|
let x = Struct { _x: 0 };
|
|
|
|
x.bar();
|
2017-12-22 08:31:51 -06:00
|
|
|
|
|
|
|
0
|
2015-11-02 07:46:39 -06:00
|
|
|
}
|