summaryrefslogtreecommitdiffstats
path: root/src/test/ui/rfc-2632-const-trait-impl/const-impl-recovery.rs
blob: 470c653dd47019b5b1a978c766e37c5303d8f540 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#![feature(const_trait_impl)]

trait Foo {}

const impl Foo for i32 {} //~ ERROR: expected identifier, found keyword

trait Bar {}

const impl<T: Foo> Bar for T {} //~ ERROR: expected identifier, found keyword

const fn still_implements<T: Bar>() {}

const _: () = still_implements::<i32>();

fn main() {}