-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
-Znext-solver Remove special handling of NormalizesTo goal
#154433
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -48,7 +48,12 @@ where | |||||||||||||||||||||||||||||||||||||
| .filter(|&def_id| defining_opaque_types.contains(&def_id)) | ||||||||||||||||||||||||||||||||||||||
| else { | ||||||||||||||||||||||||||||||||||||||
| // If we're not in the defining scope, treat the alias as rigid. | ||||||||||||||||||||||||||||||||||||||
| self.structurally_instantiate_normalizes_to_term(goal, goal.predicate.alias); | ||||||||||||||||||||||||||||||||||||||
| self.relate_rigid_alias_non_alias( | ||||||||||||||||||||||||||||||||||||||
| goal.param_env, | ||||||||||||||||||||||||||||||||||||||
| goal.predicate.alias, | ||||||||||||||||||||||||||||||||||||||
| ty::Invariant, | ||||||||||||||||||||||||||||||||||||||
| goal.predicate.term, | ||||||||||||||||||||||||||||||||||||||
| )?; | ||||||||||||||||||||||||||||||||||||||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Those replacements of asserted funtions have some reason rust/compiler/rustc_next_trait_solver/src/solve/normalizes_to/mod.rs Lines 102 to 119 in e6b64a2
As we are now using But
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, Also needs a |
||||||||||||||||||||||||||||||||||||||
| return self.evaluate_added_goals_and_make_canonical_response(Certainty::Yes); | ||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
|
|
@@ -111,7 +116,12 @@ where | |||||||||||||||||||||||||||||||||||||
| .as_local() | ||||||||||||||||||||||||||||||||||||||
| .filter(|&def_id| defined_opaque_types.contains(&def_id)) | ||||||||||||||||||||||||||||||||||||||
| else { | ||||||||||||||||||||||||||||||||||||||
| self.structurally_instantiate_normalizes_to_term(goal, goal.predicate.alias); | ||||||||||||||||||||||||||||||||||||||
| self.relate_rigid_alias_non_alias( | ||||||||||||||||||||||||||||||||||||||
| goal.param_env, | ||||||||||||||||||||||||||||||||||||||
| goal.predicate.alias, | ||||||||||||||||||||||||||||||||||||||
| ty::Invariant, | ||||||||||||||||||||||||||||||||||||||
| goal.predicate.term, | ||||||||||||||||||||||||||||||||||||||
| )?; | ||||||||||||||||||||||||||||||||||||||
| return self.evaluate_added_goals_and_make_canonical_response(Certainty::Yes); | ||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
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.
🤔 that assumes that the expected term is normalized, currently not a problem as we don't yet use this for
Projectiongoals.If we use normal equate there this would go back into alias-relate, which would then recursively call this. We could explicitly normalize the term, but that also seems like a mess
I guess keep it as is, add
FIXME(trait-system-refactor-initiative#223)and then we finish the migration after https://rust-lang.zulipchat.com/#narrow/channel/364551-t-types.2Ftrait-system-refactor/topic/Eager.20normalization.2C.20ahoy.21/with/583000386