Stream: t-compiler/help

Topic: Use of `LocalDefId`


ecstatic-morse (Apr 06 2020 at 18:57, on Zulip):

Should we be using LocalDefId wherever possible? Specifically, the Item/ConstCx type used during const checking keeps a DefId for the item being const checked, which is always local. I frequently see code that assumes regular DefIds are local. Is migrating these cases to use LocalDefId worthwhile?

eddyb (Apr 06 2020 at 19:08, on Zulip):

@ecstatic-morse ugh I meant to start going through those but I forgot since I lost my tabs

eddyb (Apr 06 2020 at 19:08, on Zulip):

feel free to do this sort of thing locally

ecstatic-morse (Apr 06 2020 at 19:09, on Zulip):

Want me to open a tracking issue? Seems like a nice E-easy project for newcomers.

eddyb (Apr 06 2020 at 19:09, on Zulip):

heh good point

eddyb (Apr 06 2020 at 19:09, on Zulip):

lemme find the WIP PR I had a while back, I forget what I put in it

eddyb (Apr 06 2020 at 19:10, on Zulip):

https://github.com/rust-lang/rust/pull/66132

eddyb (Apr 06 2020 at 19:10, on Zulip):

just this commit is new: https://github.com/rust-lang/rust/pull/66132/commits/b3c2aebfeab0b918b1bc8f7293084b91d147966a

eddyb (Apr 06 2020 at 19:11, on Zulip):

I guess I only did a small preview

ecstatic-morse (Apr 06 2020 at 19:46, on Zulip):

#70853

eddyb (Apr 06 2020 at 20:17, on Zulip):

thanks!

Last update: Sep 28 2020 at 15:30UTC