2016-04-26 12:51:14 -05:00
|
|
|
// Crate that exports a const fn. Used for testing cross-crate.
|
|
|
|
|
|
|
|
#![crate_type="rlib"]
|
|
|
|
|
2018-11-17 08:36:06 -06:00
|
|
|
pub const fn foo() -> usize { 22 }
|
|
|
|
|
|
|
|
pub const fn bar() -> fn() {
|
|
|
|
fn x() {}
|
|
|
|
x
|
|
|
|
}
|
|
|
|
|
|
|
|
#[inline]
|
|
|
|
pub const fn bar_inlined() -> fn() {
|
|
|
|
fn x() {}
|
|
|
|
x
|
|
|
|
}
|
|
|
|
|
|
|
|
#[inline(always)]
|
|
|
|
pub const fn bar_inlined_always() -> fn() {
|
|
|
|
fn x() {}
|
|
|
|
x
|
|
|
|
}
|