about summary refs log tree commit diff
path: root/src/test/ui/rfc-2632-const-trait-impl/hir-const-check.rs
blob: f7af1b506f0dba01b4d8c4239329c8850901e744 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Regression test for #69615.

#![feature(const_trait_impl, const_fn)]
#![allow(incomplete_features)]

pub trait MyTrait {
    fn method(&self);
}

impl const MyTrait for () {
    fn method(&self) {
        match *self {} //~ ERROR `match` is not allowed in a `const fn`
    }
}

fn main() {}