-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Run normalize_projection_ty
in Canonical mode
#79517
Conversation
infcx, | ||
freshener: infcx.freshener(), | ||
intercrate: true, | ||
intercrate_ambiguity_causes: None, | ||
allow_negative_impls: false, | ||
query_mode: TraitQueryMode::Standard, | ||
..SelectionContext::new(infcx) |
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.
This is just cleanup, I can move it to a separate PR if you like.
I'm pretty sure that this is incorrect - the projection code shouldn't have it's behvaior changed just at for rustdkc. Instaed, I think we need a way of enabling this only for the specific part of rustdoc that needs it. |
What about adding |
Hmm, actually that might be tricky since |
normalize_project_ty
in Canonical modenormalize_projection_ty
in Canonical mode
@Aaron1011 can you explain more about why using Canonical would be wrong for rustc (as opposed to rustdoc)? |
I'm not very familiar with the details of how normalization works, but the current mode was chosen for a reason, and changing it will almost certainly have wider consequences. |
This allows recovering from overflow errors when normalizing a type.
ff4d388
to
38d626a
Compare
ping @matthewjasper - do you know why it was in |
ping @matthewjasper. I would prefer not to special case rustdoc here but I can if you think it makes more sense. |
Closing in favor of #81091. |
This allows recovering from overflow errors when normalizing a type.
This would have prevented the regression in #79506 (comment). I don't yet have a test, since normalization in rustdoc was reverted (#79469). If you want me to add one, I can add a
-Z normalize-docs
flag to rustdoc and use it in the test.r? @Aaron1011 for review or reassignment.