We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7ad3501 commit 59ffbacCopy full SHA for 59ffbac
src/librustc_mir/transform/qualify_consts.rs
@@ -944,13 +944,8 @@ This does not pose a problem by itself because they can't be accessed directly."
944
// this doesn't come from a macro that has #[allow_internal_unstable]
945
!self.span.allows_unstable()
946
{
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 {
+ self.qualif = Qualif::NOT_CONST;
+ if self.mode != Mode::Fn {
954
// inside a constant environment, not having the feature gate is
955
// an error
956
let mut err = self.tcx.sess.struct_span_err(self.span,
0 commit comments