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 @@ -944,13 +944,8 @@ This does not pose a problem by itself because they can't be accessed directly."
944944 // this doesn't come from a macro that has #[allow_internal_unstable]
945945 !self . span . allows_unstable ( )
946946 {
947- if self . mode == Mode :: Fn {
948- // We are in a normal function
949- // with a turned off feature gate. We can still call the function
950- // but we can't promote it
951- self . qualif = Qualif :: NOT_CONST ;
952- debug ! ( "unstable const fn" ) ;
953- } else {
947+ self . qualif = Qualif :: NOT_CONST ;
948+ if self . mode != Mode :: Fn {
954949 // inside a constant environment, not having the feature gate is
955950 // an error
956951 let mut err = self . tcx . sess . struct_span_err ( self . span ,
You can’t perform that action at this time.
0 commit comments