]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2632-const-trait-impl/const-impl-recovery.rs
Recover on `const impl<> X for Y`
[rust.git] / src / test / ui / rfc-2632-const-trait-impl / const-impl-recovery.rs
1 #![feature(const_trait_impl)]
2 #![allow(incomplete_features)]
3
4 trait Foo {}
5
6 const impl Foo for i32 {} //~ ERROR: expected identifier, found keyword
7
8 trait Bar {}
9
10 const impl<T: Foo> Bar for T {} //~ ERROR: expected identifier, found keyword
11
12 const fn still_implements<T: Bar>() {}
13
14 const _: () = still_implements::<i32>();
15
16 fn main() {}