rust/src/test/ui/consts/const-expr-addr-operator.rs
2018-12-25 21:08:33 -07:00

12 lines
213 B
Rust

// Encountered while testing #44614.
// compile-pass
pub fn main() {
// Constant of generic type (int)
const X: &'static u32 = &22;
assert_eq!(0, match &22 {
X => 0,
_ => 1,
});
}