-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
wf-check user types before normalization #104746
Closed
Closed
Commits on Nov 22, 2022
-
We delay projection normalization to further stages in order to register user type annotations before normalization in HIR typeck. There are two consumers of astconv: ItemCtxt and FnCtxt. The former already expects unnormalized types from astconv, see its AstConv trait impl. The latter needs `RawTy` for a cleaner interface. Unfortunately astconv still needs the normalization machinery in order to resolve enum variants that have projections in the self type, e.g. `<<T as Trait>::Assoc>::StructVariant {}`. This is why `AstConv::normalize_ty_2` is necessary.
Configuration menu - View commit details
-
Copy full SHA for ea9517e - Browse repository at this point
Copy the full SHA ea9517eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4327a79 - Browse repository at this point
Copy the full SHA 4327a79View commit details -
Configuration menu - View commit details
-
Copy full SHA for 32b4b8a - Browse repository at this point
Copy the full SHA 32b4b8aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2ee771f - Browse repository at this point
Copy the full SHA 2ee771fView commit details -
make ascribe_user_type a TypeOp
Projection types in user annotations may contain inference variables. This makes the normalization depend on the unification with the actual type and thus requires a separate TypeOp to track the obligations. Otherwise simply calling `TypeChecker::normalize` would ICE with "unexpected ambiguity"
Configuration menu - View commit details
-
Copy full SHA for ff6a0aa - Browse repository at this point
Copy the full SHA ff6a0aaView commit details -
Configuration menu - View commit details
-
Copy full SHA for e8cde83 - Browse repository at this point
Copy the full SHA e8cde83View commit details -
Configuration menu - View commit details
-
Copy full SHA for e6dc882 - Browse repository at this point
Copy the full SHA e6dc882View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8e40dde - Browse repository at this point
Copy the full SHA 8e40ddeView commit details
Commits on Nov 23, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 3ba10e2 - Browse repository at this point
Copy the full SHA 3ba10e2View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.