Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0d88bf2

Browse files
committedJun 3, 2024
Add regression test
1 parent c9e50ae commit 0d88bf2

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//! This test used to ICE because const blocks didn't have a body
2+
//! anymore, making a lot of logic very fragile around handling the
3+
//! HIR of a const block.
4+
//! https://github.com/rust-lang/rust/issues/125846
5+
6+
//@ check-pass
7+
8+
#![feature(inline_const_pat)]
9+
10+
fn main() {
11+
match 0 {
12+
const {
13+
let a = 10_usize;
14+
*&a
15+
}
16+
| _ => {}
17+
}
18+
}

0 commit comments

Comments
 (0)
Failed to load comments.