@@ -357,7 +357,7 @@ impl<'a, 'tcx> Qualifier<'a, 'tcx, 'tcx> {
357
357
TerminatorKind :: FalseUnwind { .. } => None ,
358
358
359
359
TerminatorKind :: Return => {
360
- if !self . tcx . sess . features_untracked ( ) . const_let {
360
+ if !self . tcx . features ( ) . const_let {
361
361
// Check for unused values. This usually means
362
362
// there are extra statements in the AST.
363
363
for temp in mir. temps_iter ( ) {
@@ -464,7 +464,7 @@ impl<'a, 'tcx> Visitor<'tcx> for Qualifier<'a, 'tcx, 'tcx> {
464
464
LocalKind :: ReturnPointer => {
465
465
self . not_const ( ) ;
466
466
}
467
- LocalKind :: Var if !self . tcx . sess . features_untracked ( ) . const_let => {
467
+ LocalKind :: Var if !self . tcx . features ( ) . const_let => {
468
468
if self . mode != Mode :: Fn {
469
469
emit_feature_err ( & self . tcx . sess . parse_sess , "const_let" ,
470
470
self . span , GateIssue :: Language ,
@@ -558,7 +558,7 @@ impl<'a, 'tcx> Visitor<'tcx> for Qualifier<'a, 'tcx, 'tcx> {
558
558
Mode :: Fn => { } ,
559
559
_ => {
560
560
if let ty:: RawPtr ( _) = base_ty. sty {
561
- if !this. tcx . sess . features_untracked ( ) . const_raw_ptr_deref {
561
+ if !this. tcx . features ( ) . const_raw_ptr_deref {
562
562
emit_feature_err (
563
563
& this. tcx . sess . parse_sess , "const_raw_ptr_deref" ,
564
564
this. span , GateIssue :: Language ,
@@ -581,7 +581,7 @@ impl<'a, 'tcx> Visitor<'tcx> for Qualifier<'a, 'tcx, 'tcx> {
581
581
match this. mode {
582
582
Mode :: Fn => this. not_const ( ) ,
583
583
Mode :: ConstFn => {
584
- if !this. tcx . sess . features_untracked ( ) . const_fn_union {
584
+ if !this. tcx . features ( ) . const_fn_union {
585
585
emit_feature_err (
586
586
& this. tcx . sess . parse_sess , "const_fn_union" ,
587
587
this. span , GateIssue :: Language ,
@@ -807,7 +807,7 @@ impl<'a, 'tcx> Visitor<'tcx> for Qualifier<'a, 'tcx, 'tcx> {
807
807
if let Mode :: Fn = self . mode {
808
808
// in normal functions, mark such casts as not promotable
809
809
self . add ( Qualif :: NOT_CONST ) ;
810
- } else if !self . tcx . sess . features_untracked ( ) . const_raw_ptr_to_usize_cast {
810
+ } else if !self . tcx . features ( ) . const_raw_ptr_to_usize_cast {
811
811
// in const fn and constants require the feature gate
812
812
// FIXME: make it unsafe inside const fn and constants
813
813
emit_feature_err (
@@ -834,7 +834,7 @@ impl<'a, 'tcx> Visitor<'tcx> for Qualifier<'a, 'tcx, 'tcx> {
834
834
if let Mode :: Fn = self . mode {
835
835
// raw pointer operations are not allowed inside promoteds
836
836
self . add ( Qualif :: NOT_CONST ) ;
837
- } else if !self . tcx . sess . features_untracked ( ) . const_compare_raw_pointers {
837
+ } else if !self . tcx . features ( ) . const_compare_raw_pointers {
838
838
// require the feature gate inside constants and const fn
839
839
// FIXME: make it unsafe to use these operations
840
840
emit_feature_err (
@@ -933,7 +933,7 @@ impl<'a, 'tcx> Visitor<'tcx> for Qualifier<'a, 'tcx, 'tcx> {
933
933
if self . mode != Mode :: Fn {
934
934
is_const_fn = true ;
935
935
// const eval transmute calls only with the feature gate
936
- if !self . tcx . sess . features_untracked ( ) . const_transmute {
936
+ if !self . tcx . features ( ) . const_transmute {
937
937
emit_feature_err (
938
938
& self . tcx . sess . parse_sess , "const_transmute" ,
939
939
self . span , GateIssue :: Language ,
@@ -971,7 +971,7 @@ impl<'a, 'tcx> Visitor<'tcx> for Qualifier<'a, 'tcx, 'tcx> {
971
971
// FIXME: cannot allow this inside `allow_internal_unstable` because
972
972
// that would make `panic!` insta stable in constants, since the
973
973
// macro is marked with the attr
974
- if self . tcx . sess . features_untracked ( ) . const_panic {
974
+ if self . tcx . features ( ) . const_panic {
975
975
is_const_fn = true ;
976
976
} else {
977
977
// don't allow panics in constants without the feature gate
@@ -1158,7 +1158,7 @@ impl<'a, 'tcx> Visitor<'tcx> for Qualifier<'a, 'tcx, 'tcx> {
1158
1158
if let ( Mode :: ConstFn , & Place :: Local ( index) ) = ( self . mode , dest) {
1159
1159
if self . mir . local_kind ( index) == LocalKind :: Var &&
1160
1160
self . const_fn_arg_vars . insert ( index) &&
1161
- !self . tcx . sess . features_untracked ( ) . const_let {
1161
+ !self . tcx . features ( ) . const_let {
1162
1162
1163
1163
// Direct use of an argument is permitted.
1164
1164
match * rvalue {
0 commit comments