]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/consts/control-flow/issue-46843.rs
1 // revisions: stock if_match
3 #![cfg_attr(if_match, feature(const_if_match))]
5 enum Thing { This, That }
7 fn non_const() -> Thing
{
11 pub const Q
: i32 = match non_const() {
12 //[stock]~^ ERROR `match` is not allowed in a `const`
13 //[if_match]~^^ ERROR calls in constants are limited to constant functions