mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-04 17:22:19 +00:00
13 lines
296 B
Rust
13 lines
296 B
Rust
#![crate_type = "lib"]
|
|
|
|
fn example<const N: usize>() {}
|
|
|
|
fn other() {
|
|
example::<[usize; 3]>();
|
|
//~^ ERROR type provided when a const
|
|
//~| ERROR type annotations needed
|
|
example::<[usize; 4 + 5]>();
|
|
//~^ ERROR type provided when a const
|
|
//~| ERROR type annotations needed
|
|
}
|