-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Normalize projections in evaluated const display and layout calculation #19234
base: master
Are you sure you want to change the base?
fix: Normalize projections in evaluated const display and layout calculation #19234
Conversation
It works with the test but still not working on real IDE for some reason, I'm investigating why. |
0c26312
to
4b11fdb
Compare
4b11fdb
to
ae6b3d0
Compare
OK, this is now ready. This is a very big PR to fix one FIXME and a tiny issue 🤣 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM, though I wonder if we shouldn't have something like a DisplayContext
wrapping the CrateId
that gets passed everywhere, to 1) make this easier if we need to change again what we need for displaying, 2) make it clearer that this is used for displaying -- I was wondering for a moment why things like EvaluatedConst::render
don't just use self.def.krate()
, but that's because we're potentially rendering them in a different context.
Yeah I think I'll do that, that sounds like a better idea. I used the name |
This is required to format evaluated consts, because we need trait env, and it needs the crate (currently it uses the last crate in topological order, which is wrong, the next commit will fix that).
ae6b3d0
to
43e4a5a
Compare
@flodiebold Okay I implemented that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Fixes #19231.