Stream: t-compiler/const-eval

Topic: `allow_internal_unstable` and new features

ecstatic-morse (Dec 12 2019 at 19:33, on Zulip):

@oli Do you think you can explain #67251 a bit? My understanding is that we want to disallow #[rustc_const_stable] functions in the standard library from using nightly-only features without #[allow_internal_unstable]. Otherwise we would have no recourse if that feature was found to be unsound.

However, I don't understand why #![feature(const_fn)] is involved?

oli (Dec 13 2019 at 09:48, on Zulip):

Well, the thing was that if users used the feature gate, their functions got marked as min_const_fn, now, without allow_internal_unstable these functions are no longer min_const_fn, thus requiring the const_fn feature gate. We could probably come up with a scheme that "just allows" this without the const_fn feature gate, but let's do that after the beta cutoff without any hurry

ecstatic-morse (Dec 13 2019 at 21:29, on Zulip):

Ah okay. I'm trying to understand what exactly to do for loops, since it seems like a loop with an unconditional break will still be a min const fn unless it also has a false unwind. Maybe this is fine?

oli (Dec 13 2019 at 22:02, on Zulip):

Yea seems fine to me, although if we were really strict this would require some additional trickery to carry the info down from HIR

oli (Dec 13 2019 at 22:03, on Zulip):

But this is only a problem for libstd anyway, and who would use a loop with an unconditional break there

ecstatic-morse (Dec 13 2019 at 22:04, on Zulip):

I'll stop fussing then :smile:

ecstatic-morse (Dec 13 2019 at 22:04, on Zulip):

In that case, #67216 should be good to go

oli (Dec 13 2019 at 22:43, on Zulip):

:ship: it

Last update: Apr 05 2020 at 01:20UTC