rust/tests/ui/const-generics/suggest_const_for_array.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
218 B
Rust
Raw Normal View History

#![crate_type = "lib"]
fn example<const N: usize>() {}
fn other() {
example::<[usize; 3]>();
//~^ ERROR type provided when a const
example::<[usize; 4 + 5]>();
//~^ ERROR type provided when a const
}