about summary refs log tree commit diff
path: root/tests/ui/consts/const-meth-pattern.rs
blob: 72de172222fee10e2d221db9823a54650660d283 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//@ run-pass

struct A;

impl A {
    const fn banana() -> bool {
        true
    }
}

const ABANANA: bool = A::banana();

fn main() {
    match true {
        ABANANA => {},
        _ => panic!("what?")
    }
}