]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-meth-pattern.rs
Rollup merge of #64603 - gilescope:unused-lifetime-warning, r=matthewjasper
[rust.git] / src / test / ui / consts / const-meth-pattern.rs
1 // run-pass
2
3 struct A;
4
5 impl A {
6     const fn banana() -> bool {
7         true
8     }
9 }
10
11 const ABANANA: bool = A::banana();
12
13 fn main() {
14     match true {
15         ABANANA => {},
16         _ => panic!("what?")
17     }
18 }