Stream: t-compiler/const-eval

Topic: Removing old const checker/qualifier


ecstatic-morse (Oct 28 2019 at 02:03, on Zulip):

A patched version of the new dataflow-based const validator finally got a crater run in #65829 with three regressions, all of which seem spurious (to me at least :smile:). #63812, which computes the promotability of temps was only recently merged on nightly but has already had a crater run with no regressions.

Currently, both are run in parallel with the pass they are intended to replace, and any mismatch in their output causes a compiler error. At what point are we comfortable with tearing out the old pass in qualify_consts that does everything @T-compiler?

ecstatic-morse (Oct 28 2019 at 02:07, on Zulip):

I think we probably want to run the new promotability analysis on nightly for a week or two, but it seems pretty low risk to me.

eddyb (Oct 28 2019 at 09:49, on Zulip):

I think we can start drafting a PR for removing the old promotion stuff but keeping the two const-checkers, mostly to see just how much we can clean up

ecstatic-morse (Oct 28 2019 at 16:00, on Zulip):

Is there a reason not to do both in one shot? I guess it doesn't save that much work. I'll get started on this.

ecstatic-morse (Oct 29 2019 at 05:30, on Zulip):

I trired out porting the existing queries to use only the new checker and promotion stuff, removing qualify_consts entirely.

https://github.com/rust-lang/rust/compare/master...ecstatic-morse:new-qualify-consts

The first 7 commits stand on their own and just do the promotion part. It's pretty hacky at the moment, especially in promote_consts where it errors when promotion fails for rustc_args_required_const. I'll polish it up tomorrow and open a draft PR.

ecstatic-morse (Oct 29 2019 at 05:31, on Zulip):

I'm pretty exhausted, so maybe ignore this until I can do a bit of work on it tomorrow :smile:

ecstatic-morse (Oct 29 2019 at 18:28, on Zulip):

Okay, #65942 is up and actually in a mergeable state. I'll rebase the switch to the new const checker on top of that instead.

Last update: Nov 15 2019 at 20:00UTC