File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
compiler/rustc_middle/src/mir/interpret Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,10 @@ impl<'tcx> TyCtxt<'tcx> {
9595 // used generic parameters is a bug of evaluation, so checking for it
9696 // here does feel somewhat sensible.
9797 if !self . features ( ) . generic_const_exprs && ct. substs . has_non_region_param ( ) {
98- assert ! ( matches!( self . def_kind( ct. def) , DefKind :: AnonConst ) ) ;
98+ assert ! ( matches!(
99+ self . def_kind( ct. def) ,
100+ DefKind :: InlineConst | DefKind :: AnonConst
101+ ) ) ;
99102 let mir_body = self . mir_for_ctfe ( ct. def ) ;
100103 if mir_body. is_polymorphic {
101104 let Some ( local_def_id) = ct. def . as_local ( ) else { return } ;
Original file line number Diff line number Diff line change 1+ // run-pass
2+ #![ feature( inline_const_pat) ]
3+ #![ allow( dead_code) ]
4+ #![ allow( incomplete_features) ]
5+ fn foo < const V : usize > ( ) {
6+ match 0 {
7+ const { 1 << 5 } | _ => { }
8+ }
9+ }
10+
11+ fn main ( ) { }
You can’t perform that action at this time.
0 commit comments