mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 15:54:15 +00:00
23 lines
330 B
Rust
23 lines
330 B
Rust
// Crate that exports a const fn. Used for testing cross-crate.
|
|
|
|
#![crate_type="rlib"]
|
|
|
|
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
|
|
}
|