mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
12 lines
231 B
Rust
12 lines
231 B
Rust
// Test use of const fn from another crate without a feature gate.
|
|
|
|
//@ check-pass
|
|
//@ aux-build:const_fn_lib.rs
|
|
|
|
extern crate const_fn_lib;
|
|
|
|
use const_fn_lib::foo;
|
|
|
|
fn main() {
|
|
let x = foo(); // use outside a constant is ok
|
|
}
|