mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-11 16:15:03 +00:00
21 lines
434 B
Rust
21 lines
434 B
Rust
// compile-flags: -O -Zcross-crate-inline-threshold=yes
|
|
// aux-build:leaf.rs
|
|
|
|
#![crate_type = "lib"]
|
|
|
|
extern crate leaf;
|
|
|
|
// Check that we inline a leaf cross-crate call
|
|
#[no_mangle]
|
|
pub fn leaf_outer() -> String {
|
|
// CHECK-NOT: call {{.*}}leaf_fn
|
|
leaf::leaf_fn()
|
|
}
|
|
|
|
// Check that we do not inline a non-leaf cross-crate call
|
|
#[no_mangle]
|
|
pub fn stem_outer() -> String {
|
|
// CHECK: call {{.*}}stem_fn
|
|
leaf::stem_fn()
|
|
}
|