summary refs log tree commit diff
path: root/tests/ui/inline-const/const-block-pat-liveness.rs
blob: 26393a4f65b8492b4bfb2fc8d6e327d66c2cf298 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! This test used to ICE because const blocks didn't have a body
//! anymore, making a lot of logic very fragile around handling the
//! HIR of a const block.
//! https://github.com/rust-lang/rust/issues/125846

//@ check-pass

#![feature(inline_const_pat)]

fn main() {
    match 0 {
        const {
            let a = 10_usize;
            *&a
        }
        | _ => {}
    }
}