Change:
As soon as I've seen the new inline_const feature, I've tried to find some use cases for it in my code, and I did find only very few of them, unfortunately, and one of the two uses cases could be reduced to this: That gives errors: So I am not sure if this is a bug report or an enhancement request.
Note that this does work in expressions ():
Support for ranges in patterns ( or ) needs to be separately, to and respectively.
Ohh I've just realized that we had this issue opened, I've fixed this in Going to adjust description of the PR accordingly so it closes this issue when merged.

Discussion:
}) } else if self.eat_keyword(kw::Unsafe) { self.parse_block_expr(None, lo, BlockCheckMode::Unsafe(ast::UserProvided), attrs) <del> } else if self.check_inline_const() { self.parse_const_expr(lo.to(self.token.span)) </del> <ins> } else if self.check_inline_const(0) { self.parse_const_block(lo.to(self.token.span)) </ins> } else if self.is_do_catch_block() { self.recover_do_catch(attrs) } else if self.is_try_block() {

self.check_or_expected(self.token.can_begin_const_arg(), TokenType::Const) } <del> fn check_inline_const(&mut self) -> bool { self.check_keyword(kw::Const) && self.look_ahead(1, |t| match t.kind { </del> <ins> fn check_inline_const(&self, dist: usize) -> bool { self.is_keyword_ahead(dist, &[kw::Const]) && self.look_ahead(dist + 1, |t| match t.kind { </ins> token::Interpolated(ref nt) => matches!(**nt, token::NtBlock(..)), token::OpenDelim(DelimToken::Brace) => true, _ => false,

} /// Parses inline const expressions. <del> fn parse_const_expr(&mut self, span: Span) -> PResult<'a, P<Expr>> { </del> <ins> fn parse_const_block(&mut self, span: Span) -> PResult<'a, P<Expr>> { </ins> self.sess.gated_spans.gate(sym::inline_const, span); self.eat_keyword(kw::Const); let blk = self.parse_block()?;

let pat = self.parse_pat_with_range_pat(false, None)?; self.sess.gated_spans.gate(sym::box_patterns, lo.to(self.prev_token.span)); PatKind::Box(pat) <del> } else if self.check_inline_const() { </del> <ins> } else if self.check_inline_const(0) { </ins> // Parse `const pat` <del> PatKind::Lit(self.parse_const_expr(lo.to(self.token.span))?) </del> <ins> let const_expr = self.parse_const_block(lo.to(self.token.span))?; if let Some(re) = self.parse_range_end() { self.parse_pat_range_begin_with(const_expr, re)? } else { PatKind::Lit(const_expr) } </ins> } else if self.can_be_ident_pat() { // Parse `ident @ pat` // This can give false positives and parse nullary enums,

/// Is the token `dist` away from the current suitable as the start of a range patterns end? fn is_pat_range_end_start(&self, dist: usize) -> bool { <del> self.look_ahead(dist, |t| { t.is_path_start() // e.g. `MY_CONST`; </del> <ins> self.check_inline_const(dist) || self.look_ahead(dist, |t| { t.is_path_start() // e.g. `MY_CONST`; </ins> || t.kind == token::Dot // e.g. `.5` for recovery; || t.can_begin_literal_maybe_minus() // e.g. `42`. || t.is_whole_expr() <del> }) </del> <ins> }) </ins> } fn parse_pat_range_end(&mut self) -> PResult<'a, P<Expr>> { <del> if self.check_path() { </del> <ins> if self.check_inline_const(0) { self.parse_const_block(self.token.span) } else if self.check_path() { </ins> let lo = self.token.span; let (qself, path) = if self.eat_lt() { // Parse a qualified path

<ins> // build-pass #![allow(incomplete_features)] #![feature(inline_const, half_open_range_patterns, exclusive_range_pattern)] fn main() { const N: u32 = 10; let x: u32 = 3; match x { 1 ..= const { N + 1 } => {}, _ => {}, } match x { const { N - 1 } ..= 10 => {}, _ => {}, } match x { const { N - 1 } ..= const { N + 1 } => {}, _ => {}, } match x { .. const { N + 1 } => {}, _ => {}, } match x { const { N - 1 } .. => {}, _ => {}, } match x { ..= const { N + 1 } => {}, _ => {} } } </ins>

fn f() { |[](* } //~^ ERROR expected one of `,` or `:`, found `(` <del> //~| ERROR expected one of `&`, `(`, `)`, `-`, `...`, `..=`, `..`, `[`, `_`, `box`, `const`, `mut`, `ref`, `|`, identifier, or path, found `*` </del> <ins> //~| ERROR expected one of `&`, `(`, `)`, `-`, `...`, `..=`, `..`, `[`, `_`, `box`, `mut`, `ref`, `|`, identifier, or path, found `*` </ins>

LL | fn f() { |[](* } |             ^ expected one of `,` or `:` <del> error: expected one of `&`, `(`, `)`, `-`, `...`, `..=`, `..`, `[`, `_`, `box`, `const`, `mut`, `ref`, `|`, identifier, or path, found `*` </del> <ins> error: expected one of `&`, `(`, `)`, `-`, `...`, `..=`, `..`, `[`, `_`, `box`, `mut`, `ref`, `|`, identifier, or path, found `*` </ins> --> $DIR/issue-66357-unexpected-unreachable.rs:14:14 | LL | fn f() { |[](* }