mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
18 lines
213 B
Rust
18 lines
213 B
Rust
//@ run-pass
|
|
|
|
struct A;
|
|
|
|
impl A {
|
|
const fn banana() -> bool {
|
|
true
|
|
}
|
|
}
|
|
|
|
const ABANANA: bool = A::banana();
|
|
|
|
fn main() {
|
|
match true {
|
|
ABANANA => {},
|
|
_ => panic!("what?")
|
|
}
|
|
}
|