mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
13 lines
219 B
Rust
13 lines
219 B
Rust
//@ revisions:cfail1
|
|
|
|
#![allow(unused_variables)]
|
|
|
|
struct S<T, const N: usize>([T; N]);
|
|
|
|
fn f<T, const N: usize>(x: T) -> S<T, {N}> { panic!() }
|
|
|
|
fn main() {
|
|
f(0u8);
|
|
//[cfail1]~^ ERROR type annotations needed
|
|
}
|