mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
12 lines
286 B
Rust
12 lines
286 B
Rust
fn ty_param<T>() -> [u8; std::mem::size_of::<T>()] {
|
|
//~^ ERROR generic parameters may not be used in const operations
|
|
todo!()
|
|
}
|
|
|
|
fn const_param<const N: usize>() -> [u8; N + 1] {
|
|
//~^ ERROR generic parameters may not be used in const operations
|
|
todo!()
|
|
}
|
|
|
|
fn main() {}
|