2021-04-03 06:05:11 -05:00
|
|
|
//
|
2021-09-19 11:57:19 -05:00
|
|
|
// We specify incremental here because we want to test the partitioning for
|
2017-10-06 16:59:33 -05:00
|
|
|
// incremental compilation
|
2021-09-19 11:57:19 -05:00
|
|
|
// incremental
|
|
|
|
// compile-flags:-Zprint-mono-items=lazy
|
2017-10-06 16:59:33 -05:00
|
|
|
// compile-flags:-Zinline-in-all-cgus=no
|
|
|
|
|
|
|
|
#![allow(dead_code)]
|
|
|
|
#![crate_type="lib"]
|
|
|
|
|
|
|
|
mod inline {
|
|
|
|
|
2020-08-28 08:31:03 -05:00
|
|
|
//~ MONO_ITEM fn inline::inlined_function @@ local_inlining_but_not_all-inline[External]
|
2017-10-11 10:47:47 -05:00
|
|
|
#[inline]
|
2017-10-06 16:59:33 -05:00
|
|
|
pub fn inlined_function()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-10-27 07:31:18 -05:00
|
|
|
pub mod user1 {
|
2017-10-06 16:59:33 -05:00
|
|
|
use super::inline;
|
|
|
|
|
2020-08-28 08:31:03 -05:00
|
|
|
//~ MONO_ITEM fn user1::foo @@ local_inlining_but_not_all-user1[External]
|
2017-10-27 07:31:18 -05:00
|
|
|
pub fn foo() {
|
2017-10-06 16:59:33 -05:00
|
|
|
inline::inlined_function();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-10-27 07:31:18 -05:00
|
|
|
pub mod user2 {
|
2017-10-06 16:59:33 -05:00
|
|
|
use super::inline;
|
|
|
|
|
2020-08-28 08:31:03 -05:00
|
|
|
//~ MONO_ITEM fn user2::bar @@ local_inlining_but_not_all-user2[External]
|
2017-10-27 07:31:18 -05:00
|
|
|
pub fn bar() {
|
2017-10-06 16:59:33 -05:00
|
|
|
inline::inlined_function();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-10-27 07:31:18 -05:00
|
|
|
pub mod non_user {
|
2017-10-06 16:59:33 -05:00
|
|
|
|
2020-08-28 08:31:03 -05:00
|
|
|
//~ MONO_ITEM fn non_user::baz @@ local_inlining_but_not_all-non_user[External]
|
2017-10-27 07:31:18 -05:00
|
|
|
pub fn baz() {
|
2017-10-06 16:59:33 -05:00
|
|
|
|
|
|
|
}
|
|
|
|
}
|