2021-09-19 16:57:19 +00:00
|
|
|
// We specify incremental here because we want to test the partitioning for
|
2016-05-01 17:53:39 +00:00
|
|
|
// incremental compilation
|
2021-09-19 16:57:19 +00:00
|
|
|
// incremental
|
|
|
|
// compile-flags:-Zprint-mono-items=eager
|
2016-03-24 15:40:49 +00:00
|
|
|
|
|
|
|
#![allow(dead_code)]
|
|
|
|
#![crate_type="lib"]
|
|
|
|
|
2020-08-28 13:31:03 +00:00
|
|
|
//~ MONO_ITEM fn generic::<u32> @@ local_generic.volatile[External]
|
|
|
|
//~ MONO_ITEM fn generic::<u64> @@ local_generic.volatile[External]
|
|
|
|
//~ MONO_ITEM fn generic::<char> @@ local_generic.volatile[External]
|
|
|
|
//~ MONO_ITEM fn generic::<&str> @@ local_generic.volatile[External]
|
2016-03-24 15:40:49 +00:00
|
|
|
pub fn generic<T>(x: T) -> T { x }
|
|
|
|
|
2020-08-28 13:31:03 +00:00
|
|
|
//~ MONO_ITEM fn user @@ local_generic[Internal]
|
2016-03-24 15:40:49 +00:00
|
|
|
fn user() {
|
|
|
|
let _ = generic(0u32);
|
|
|
|
}
|
|
|
|
|
|
|
|
mod mod1 {
|
|
|
|
pub use super::generic;
|
|
|
|
|
2020-08-28 13:31:03 +00:00
|
|
|
//~ MONO_ITEM fn mod1::user @@ local_generic-mod1[Internal]
|
2016-03-24 15:40:49 +00:00
|
|
|
fn user() {
|
|
|
|
let _ = generic(0u64);
|
|
|
|
}
|
|
|
|
|
|
|
|
mod mod1 {
|
|
|
|
use super::generic;
|
|
|
|
|
2020-08-28 13:31:03 +00:00
|
|
|
//~ MONO_ITEM fn mod1::mod1::user @@ local_generic-mod1-mod1[Internal]
|
2016-03-24 15:40:49 +00:00
|
|
|
fn user() {
|
|
|
|
let _ = generic('c');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
mod mod2 {
|
|
|
|
use super::generic;
|
|
|
|
|
2020-08-28 13:31:03 +00:00
|
|
|
//~ MONO_ITEM fn mod2::user @@ local_generic-mod2[Internal]
|
2016-03-24 15:40:49 +00:00
|
|
|
fn user() {
|
|
|
|
let _ = generic("abc");
|
|
|
|
}
|
|
|
|
}
|