提交 a11f7856 编写于 作者: O Oliver Schneider

Always mark unstable const fn as not const

上级 383a5df5
......@@ -982,13 +982,8 @@ fn visit_terminator_kind(&mut self,
// this doesn't come from a macro that has #[allow_internal_unstable]
!self.span.allows_unstable()
{
if self.mode == Mode::Fn {
// We are in a normal function
// with a turned off feature gate. We can still call the function
// but we can't promote it
self.qualif = Qualif::NOT_CONST;
debug!("unstable const fn");
} else {
self.qualif = Qualif::NOT_CONST;
if self.mode != Mode::Fn {
// inside a constant environment, not having the feature gate is
// an error
let mut err = self.tcx.sess.struct_span_err(self.span,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册