We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0a94f78 commit 329fd90Copy full SHA for 329fd90
src/librustc_mir/transform/qualify_consts.rs
@@ -972,13 +972,8 @@ This does not pose a problem by itself because they can't be accessed directly."
972
// this doesn't come from a macro that has #[allow_internal_unstable]
973
!self.span.allows_unstable()
974
{
975
- if self.mode == Mode::Fn {
976
- // We are in a normal function
977
- // with a turned off feature gate. We can still call the function
978
- // but we can't promote it
979
- self.qualif = Qualif::NOT_CONST;
980
- debug!("unstable const fn");
981
- } else {
+ self.qualif = Qualif::NOT_CONST;
+ if self.mode != Mode::Fn {
982
// inside a constant environment, not having the feature gate is
983
// an error
984
let mut err = self.tcx.sess.struct_span_err(self.span,
0 commit comments