-
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
More through normalization, Feb/Mar 2017 edition #40163
Conversation
r? @pnkfelix (rust_highfive has picked a reviewer for you, use r? to override) |
r? @eddyb |
Don't merge - there's still a test (default_ty_param_default_dependent_associated_type) that causes broken MIR - silently until now - which is now an ICE. EDIT: found a fix to 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, but the Lvalue::Static
change makes me nervous. cc @rust-lang/compiler Any opinions?
fa396b1
to
0037a9a
Compare
Can @nikomatsakis confirm that I didn't break new-style default inference in 4dee3c45080b5f9b917f8d4696adb424ff67a28e ? |
r? @nikomatsakis -- I will review today. |
The third issue linked in the PR description (#38185) must have a typo, since currently it's an unrelated PR and not an issue. |
Fixes rust-lang#27901. Fixes rust-lang#28828. Fixes rust-lang#38135. Fixes rust-lang#39363.
The types of statics, like all other items, are stored in the tcx unnormalized. This is necessarily so, because a) Item types other than statics have generics, which can't be normalized. b) Eager normalization causes undesirable on-demand dependencies. Keeping with the principle that MIR lvalues require no normalization in order to interpret, this patch stores the normalized type of the statics in the Lvalue and reads it to get the lvalue type. Fixes rust-lang#39367.
I'll like @nikomatsakis or someone to look at the unsolved variable case.
We ought to do that sometime, and this PR fixes all broken MIR errors I could find.
Fixed |
0037a9a
to
4aede75
Compare
@arielb1 this looks good, I think I will do a crater run perhaps though? I see you changed the MIR stuff from warn to bug and I'm curious what may be affected... |
Zero regressions found: https://gist.github.com/nikomatsakis/c380f63061941c4989faf58469f36356 |
@bors r+ |
📌 Commit 4aede75 has been approved by |
☀️ Test successful - status-appveyor, status-travis |
…wup, r=arielb1 Fix normalization error Follows rust-lang#40163. I don't know whether this is good, but seems logical. [This block of code](https://github.com/rust-lang/rust/blob/ba07bd5d23aced6d4baa5696213b11ca832c1a5d/src/librustc_typeck/check/mod.rs#L2110-L2138) doesn't contain a call to `normalize_associated_types_in`, while [this](https://github.com/rust-lang/rust/blob/master/src/librustc_typeck/check/mod.rs#L2027-L2028) block does, and is nearly identical. Ideally these two blocks should be unified into one, but since the change doesn't seem trivial and I'm unsure if this patch will be accepted it hasn't been done yet. r? @arielb1
Fix a few normalization bugs.
Fixes #27901.
Fixes #28828.
Fixes #38135.
Fixes #39363.
Fixes #39367.