2024-05-11 23:29:07 +00:00
|
|
|
// We specify incremental here because we want to test the partitioning for incremental compilation
|
2021-09-19 16:57:19 +00:00
|
|
|
//@ incremental
|
|
|
|
//@ compile-flags:-Zprint-mono-items=lazy
|
2017-10-06 21:59:33 +00:00
|
|
|
//@ compile-flags:-Zinline-in-all-cgus
|
2016-03-24 15:40:49 +00:00
|
|
|
|
|
|
|
#![allow(dead_code)]
|
2024-05-29 04:25:55 +00:00
|
|
|
#![crate_type = "rlib"]
|
2016-03-24 15:40:49 +00:00
|
|
|
|
|
|
|
mod inline {
|
|
|
|
|
2020-08-28 13:31:03 +00:00
|
|
|
//~ MONO_ITEM fn inline::inlined_function @@ local_transitive_inlining-indirect_user[Internal]
|
2016-03-24 15:40:49 +00:00
|
|
|
#[inline(always)]
|
2024-05-29 04:25:55 +00:00
|
|
|
pub fn inlined_function() {}
|
2016-03-24 15:40:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
mod direct_user {
|
|
|
|
use super::inline;
|
|
|
|
|
2020-08-28 13:31:03 +00:00
|
|
|
//~ MONO_ITEM fn direct_user::foo @@ local_transitive_inlining-indirect_user[Internal]
|
2016-03-24 15:40:49 +00:00
|
|
|
#[inline(always)]
|
|
|
|
pub fn foo() {
|
|
|
|
inline::inlined_function();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-10-27 12:31:18 +00:00
|
|
|
pub mod indirect_user {
|
2016-03-24 15:40:49 +00:00
|
|
|
use super::direct_user;
|
|
|
|
|
2020-08-28 13:31:03 +00:00
|
|
|
//~ MONO_ITEM fn indirect_user::bar @@ local_transitive_inlining-indirect_user[External]
|
2017-10-27 12:31:18 +00:00
|
|
|
pub fn bar() {
|
2016-03-24 15:40:49 +00:00
|
|
|
direct_user::foo();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-10-27 12:31:18 +00:00
|
|
|
pub mod non_user {
|
2016-03-24 15:40:49 +00:00
|
|
|
|
2020-08-28 13:31:03 +00:00
|
|
|
//~ MONO_ITEM fn non_user::baz @@ local_transitive_inlining-non_user[External]
|
2024-05-29 04:25:55 +00:00
|
|
|
pub fn baz() {}
|
2016-03-24 15:40:49 +00:00
|
|
|
}
|