about summary refs log tree commit diff
path: root/tests/ui/traits/const-traits/impl-conditionally-const-trait.rs
blob: f3783c9e69b2e7b328d06cd704c99d90a4f4a950 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//! This test ensures that we can only implement `const Trait` for a type
//! and not have the conditionally const syntax in that position.

#![feature(const_trait_impl)]

struct S;
trait T {}

impl [const] T for S {}
//~^ ERROR expected identifier, found `]`

fn main() {}