mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
10 lines
194 B
Rust
10 lines
194 B
Rust
// Checks that `const fn` with const params can be used.
|
|
// run-pass
|
|
|
|
const fn const_u32_identity<const X: u32>() -> u32 {
|
|
X
|
|
}
|
|
|
|
fn main() {
|
|
assert_eq!(const_u32_identity::<18>(), 18);
|
|
}
|