]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2632-const-trait-impl/const-impl-recovery.rs
Rollup merge of #99244 - gthb:doc-improve-iterator-scan, r=m-ou-se
[rust.git] / src / test / ui / rfc-2632-const-trait-impl / const-impl-recovery.rs
1 #![feature(const_trait_impl)]
2
3 #[const_trait]
4 trait Foo {}
5
6 const impl Foo for i32 {} //~ ERROR: expected identifier, found keyword
7
8 #[const_trait]
9 trait Bar {}
10
11 const impl<T: Foo> Bar for T {} //~ ERROR: expected identifier, found keyword
12
13 const fn still_implements<T: Bar>() {}
14
15 const _: () = still_implements::<i32>();
16
17 fn main() {}