rust/src/test/ui/const-generics/diagnostics.rs

14 lines
296 B
Rust
Raw Normal View History

#![crate_type="lib"]
#![feature(const_generics)]
#![allow(incomplete_features)]
struct A<const N: u8>;
trait Foo {}
impl Foo for A<N> {}
//~^ ERROR type provided when a constant
//~| ERROR cannot find type
struct B<const N: u8>;
impl<N> Foo for B<N> {}
//~^ ERROR type provided when a constant