File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
src/librustc_mir/transform Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -982,13 +982,8 @@ This does not pose a problem by itself because they can't be accessed directly."
982
982
// this doesn't come from a macro that has #[allow_internal_unstable]
983
983
!self . span . allows_unstable ( )
984
984
{
985
- if self . mode == Mode :: Fn {
986
- // We are in a normal function
987
- // with a turned off feature gate. We can still call the function
988
- // but we can't promote it
989
- self . qualif = Qualif :: NOT_CONST ;
990
- debug ! ( "unstable const fn" ) ;
991
- } else {
985
+ self . qualif = Qualif :: NOT_CONST ;
986
+ if self . mode != Mode :: Fn {
992
987
// inside a constant environment, not having the feature gate is
993
988
// an error
994
989
let mut err = self . tcx . sess . struct_span_err ( self . span ,
You can’t perform that action at this time.
0 commit comments