-
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
Various impl trait in assoc tys cleanups #112891
Various impl trait in assoc tys cleanups #112891
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @compiler-errors (or someone else) soon. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
#[instrument(skip(self), ret, level = "trace")] | ||
fn visit_ty(&mut self, t: Ty<'tcx>) -> ControlFlow<ErrorGuaranteed> { | ||
fn visit_ty(&mut self, t: Ty<'tcx>) -> ControlFlow<!> { | ||
t.super_visit_with(self)?; |
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.
Can you explain to me what the material change is in this commit ("Stop failing eagerly, and collect all opaque types even if some are erroneous")?
I don't see any tests associated with it, so is it to just suppress spurious errors or what?
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'll build a test. It's just so that when an error occurs, we'll still want to treat things as defining scopes instead of following up with a type mismatch
error. This would occur before with erroneous uses of opaque types in the defining scope.
Similarly, the first error would hide subsequent correct uses of an (possibly other) opaque type, causing follow up type mismatch errors that don't really help anyone.
@@ -97,6 +97,12 @@ impl<'tcx> TypeVisitor<TyCtxt<'tcx>> for OpaqueTypeCollector<'tcx> { | |||
} | |||
} | |||
} | |||
ty::Alias(AliasKind::Weak, alias_ty) if alias_ty.def_id.is_local() => { |
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.
✅ sounds good
@@ -0,0 +1,28 @@ | |||
//! This test shows that a field type that is a projection that resolves to an opaque, |
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'm personally okay with this behavior. Seems really niche that you'd want to define a TAIT via a normalized assoc ty, seems forwards compatible to fix this later with normalization and a recursion depth or something.
r=me with that one explanation i asked for |
☔ The latest upstream changes (presumably #112914) made this pull request unmergeable. Please resolve the merge conflicts. |
… it was open coded
…checks for defining scopes
274dab5
to
6c3dd21
Compare
@bors r=compiler-errors |
📌 Commit 6c3dd21dc932a112eb8c2d8f96e0aaf95415d646 has been approved by It is now in the queue for this repository. |
This comment has been minimized.
This comment has been minimized.
…ning, as we already errored and can hide subsequent errors this way.
6c3dd21
to
27b386a
Compare
⌛ Testing commit 27b386a with merge 29ce1bc2a89a29c7aeeadac7c405abe31c6dba53... |
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
@bors retry MIPS is segfaulty it seems |
⌛ Testing commit 27b386a with merge 37e0ce6dd056f1269cdbbad5c94b5570e2580600... |
💔 Test failed - checks-actions |
The job Click to see the possible cause of the failure (guessed by this bot)
|
sigh @bors retry mips pls |
☀️ Test successful - checks-actions |
Finished benchmarking commit (1d67eba): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 663.729s -> 661.747s (-0.30%) |
Looks like improvements outweight the regression |
r? @compiler-errors
All commits except for the last are pure refactorings. 274dab5bd658c97886a8987340bf50ae57900c39 allows struct fields to participate in deciding whether a function has an opaque in its signature.
best reviewed commit by commit