-
Notifications
You must be signed in to change notification settings - Fork 12.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
Normalize both arguments of equate_normalized_input_or_output
#90801
Normalize both arguments of equate_normalized_input_or_output
#90801
Conversation
8399cf1
to
d8d2c3b
Compare
This comment has been minimized.
This comment has been minimized.
Don't understand why this fails to build in CI, compiles locally. Is |
Quoting the doc: |
&mut self, | ||
t: Ty<'tcx>, | ||
constraints: &'b mut Vec<Lrc<QueryRegionConstraints<'tcx>>>, | ||
) -> Fallible<Ty<'tcx>> { |
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.
Why not just return both the Ty and constraints together?
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.
Or better...just add the constraints here because we have self.
|
||
pub(crate) fn add_constraints( | ||
&mut self, | ||
constraints: &mut Vec<Lrc<QueryRegionConstraints<'tcx>>>, |
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.
And just take constraints by value.
@@ -0,0 +1,43 @@ | |||
// check-pass | |||
|
|||
#![feature(generic_associated_types)] |
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.
I think both these tests would be better with the other normalize under binder tests. This one uses GATs, but is not a GATs issue. The other doesn't even use GATs.
//check-pass | ||
|
||
#![feature(generic_associated_types)] | ||
#![allow(incomplete_features)] |
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.
Doesn't need incomplete.
d8d2c3b
to
4b977f3
Compare
Thanks for the answer. |
@jackh726 thanks for the review, addressed your comments. |
@@ -0,0 +1,43 @@ | |||
// check-pass | |||
|
|||
#![feature(generic_associated_types)] |
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.
Sorry, for the location I meant src/test/ui/higher-rank-trait-bounds/normalize-under-binder
@@ -207,4 +200,27 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> { | |||
} | |||
} | |||
} | |||
|
|||
pub(crate) fn normalize_and_add_constraints(&mut self, t: Ty<'tcx>) -> Fallible<Ty<'tcx>> { | |||
let TypeOpOutput { output: norm_ty, constraints, .. } = |
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.
I forget, what are we not destructoring? For a bit, I thought we were ignoring obligations, but then I realized we switched to using a TypeOp (good idea).
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.
canonicalized_query: Option<Canonical<'tcx, Op>>
, which is only used for diagnostics purposes.
4b977f3
to
7a4aa65
Compare
📌 Commit 7a4aa65 has been approved by |
…e_inputs_output, r=jackh726 Normalize both arguments of `equate_normalized_input_or_output` Fixes rust-lang#90638 Fixes rust-lang#90612 Temporary fix for a more complex underlying problem stemming from an inability to normalize closure substs during typecheck. r? `@jackh726`
…e_inputs_output, r=jackh726 Normalize both arguments of `equate_normalized_input_or_output` Fixes rust-lang#90638 Fixes rust-lang#90612 Temporary fix for a more complex underlying problem stemming from an inability to normalize closure substs during typecheck. r? ``@jackh726``
…e_inputs_output, r=jackh726 Normalize both arguments of `equate_normalized_input_or_output` Fixes rust-lang#90638 Fixes rust-lang#90612 Temporary fix for a more complex underlying problem stemming from an inability to normalize closure substs during typecheck. r? ```@jackh726```
…e_inputs_output, r=jackh726 Normalize both arguments of `equate_normalized_input_or_output` Fixes rust-lang#90638 Fixes rust-lang#90612 Temporary fix for a more complex underlying problem stemming from an inability to normalize closure substs during typecheck. r? ````@jackh726````
⌛ Testing commit 7a4aa65 with merge 72afa80651f79e7abbf08a41813ba7cf0ed7ef5f... |
💔 Test failed - checks-actions |
The job Click to see the possible cause of the failure (guessed by this bot)
|
@bors retry |
…e_inputs_output, r=jackh726 Normalize both arguments of `equate_normalized_input_or_output` Fixes rust-lang#90638 Fixes rust-lang#90612 Temporary fix for a more complex underlying problem stemming from an inability to normalize closure substs during typecheck. r? `@jackh726`
…e_inputs_output, r=jackh726 Normalize both arguments of `equate_normalized_input_or_output` Fixes rust-lang#90638 Fixes rust-lang#90612 Temporary fix for a more complex underlying problem stemming from an inability to normalize closure substs during typecheck. r? ``@jackh726``
…e_inputs_output, r=jackh726 Normalize both arguments of `equate_normalized_input_or_output` Fixes rust-lang#90638 Fixes rust-lang#90612 Temporary fix for a more complex underlying problem stemming from an inability to normalize closure substs during typecheck. r? ```@jackh726```
Rollup of 8 pull requests Successful merges: - rust-lang#86455 (check where-clause for explicit `Sized` before suggesting `?Sized`) - rust-lang#90801 (Normalize both arguments of `equate_normalized_input_or_output`) - rust-lang#90803 (Suggest `&str.chars()` on attempt to `&str.iter()`) - rust-lang#90819 (Fixes incorrect handling of TraitRefs when emitting suggestions.) - rust-lang#90910 (fix getting the discriminant of a zero-variant enum) - rust-lang#90925 (rustc_mir_build: reorder bindings) - rust-lang#90928 (Use a different server for checking clock drift) - rust-lang#90936 (Add a regression test for rust-lang#80772) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fixes #90638
Fixes #90612
Temporary fix for a more complex underlying problem stemming from an inability to normalize closure substs during typecheck.
r? @jackh726