You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
Basically create a new enum ConstKind which has all the variants of ConstValue except for Scalar, Slice, ByRef. ConstKind should then have a variant (maybe Evaluated or just Value), which contains a ConstValue.
hey @oli-obk I have one tiny question, @eddyb mentioned here #59178 (comment) that he wants ConstKind in ty and ConstValue in its current place, is that what we aim for? I'm asking b/c often it's necessary to bring in both ConstKind and ConstValue, mainly for pattern matching. From that perspective those two are quite coupled. I feel like it'd be cleaner to have them both together. What do you think?
ConstKind fits better to ty, since that's also where ty::Const is defined. It's perfectly fine that they live in different modules imo. Also, most of the time you won't import ConstKind, but use ty::ConstKind.
Reacted by Tomas Koutsky and Eduard-Mihai Burtescu
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
Activity
RalfJung commentedon Mar 15, 2019
oli-obk commentedon Mar 15, 2019
stepnivlk commentedon Mar 15, 2019
Hey @oli-obk, happy to take this one :).
oli-obk commentedon Mar 15, 2019
Awesome! Please do note that this is a ton of work and may get annoying with rebases, so it may require some endurance to get actually merged.
varkor commentedon Mar 19, 2019
It'd also be better to wait until #59008 is merged, because there's otherwise going to be a lot of conflicts.
stepnivlk commentedon Mar 19, 2019
@varkor I see, thx for the info.
yodaldevoid commentedon May 6, 2019
@stepnivlk If you did not see, #59008 got merged! Just wanted to ping you in case you are still interested in working on this.
stepnivlk commentedon May 6, 2019
@yodaldevoid great, thx for the info and I actually missed it. I'm def interested, gonna work on that.
stepnivlk commentedon May 12, 2019
hey @oli-obk I have one tiny question, @eddyb mentioned here #59178 (comment) that he wants
ConstKindintyandConstValuein its current place, is that what we aim for? I'm asking b/c often it's necessary to bring in bothConstKindandConstValue, mainly for pattern matching. From that perspective those two are quite coupled. I feel like it'd be cleaner to have them both together. What do you think?oli-obk commentedon May 13, 2019
ConstKindfits better toty, since that's also wherety::Constis defined. It's perfectly fine that they live in different modules imo. Also, most of the time you won't importConstKind, but usety::ConstKind.Auto merge of #66233 - cjgillot:constkind, r=oli-obk