-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Do two passes of handle_opaque_type_uses_next
#147249
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
Conversation
tests/ui/traits/next-solver/opaques/hidden-types-equate-before-fallback.rs
Show resolved
Hide resolved
…pre-fallback where we equate hidden types but do not report errors
ca75834
to
a3fbae5
Compare
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
@lcnr I fixed your first three comments. The rename from |
This comment has been minimized.
This comment has been minimized.
…ve the assert in favor over a comment, and change to & for &mut
c113b29
to
283ad66
Compare
// We do actually need to check this the second pass (we can't just | ||
// store this), because we can go from `UnconstrainedHiddenType` to | ||
// `HasDefiningUse` (because of fallback) |
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.
we can also just go from no uses to a defining use due to fallback, e.g. if you have soem ?will_fallback: Trait<opaque>
goal
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 is UnconstrainedHiddleType
?
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.
it could also be None
. Maybe not with this specific example, but certainly with ?will_fallback: RequiresSend<fn_ptr_to_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.
please also/instead add the more minimized tests from rust-lang/trait-system-refactor-initiative#240
Done. Just put each minimization in the same test file. |
tests/ui/traits/next-solver/opaques/hidden-types-equate-before-fallback.rs
Outdated
Show resolved
Hide resolved
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.
nits, then r=me
…inimizations. Update comment and test.
2fc6f80
to
d51f09e
Compare
@bors r=lcnr |
Do two passes of `handle_opaque_type_uses_next` Fixes rust-lang/trait-system-refactor-initiative#240 Also did a little bit of cleanup, can squash the commits if decided. r? lcnr
Do two passes of `handle_opaque_type_uses_next` Fixes rust-lang/trait-system-refactor-initiative#240 Also did a little bit of cleanup, can squash the commits if decided. r? lcnr
Rollup of 11 pull requests Successful merges: - #146277 (Enable `u64` limbs in `core::num::bignum`) - #146976 (constify basic Clone impls) - #147249 (Do two passes of `handle_opaque_type_uses_next`) - #147266 (fix 2 search graph bugs) - #147468 (Implement fs api set_times and set_times_nofollow) - #147497 (`proc_macro` cleanups (3/N)) - #147594 (std: implement `pal::os::exit` for VEXos) - #147596 (Adjust the Arm targets in CI to reflect latest changes) - #147607 (GVN: Invalidate derefs at loop headers) - #147620 (Avoid redundant UB check in RangeFrom slice indexing) - #147647 (Hide vendoring and copyright in GHA group) r? `@ghost` `@rustbot` modify labels: rollup
Do two passes of `handle_opaque_type_uses_next` Fixes rust-lang/trait-system-refactor-initiative#240 Also did a little bit of cleanup, can squash the commits if decided. r? lcnr
Do two passes of `handle_opaque_type_uses_next` Fixes rust-lang/trait-system-refactor-initiative#240 Also did a little bit of cleanup, can squash the commits if decided. r? lcnr
Do two passes of `handle_opaque_type_uses_next` Fixes rust-lang/trait-system-refactor-initiative#240 Also did a little bit of cleanup, can squash the commits if decided. r? lcnr
Do two passes of `handle_opaque_type_uses_next` Fixes rust-lang/trait-system-refactor-initiative#240 Also did a little bit of cleanup, can squash the commits if decided. r? lcnr
Rollup of 12 pull requests Successful merges: - #146277 (Enable `u64` limbs in `core::num::bignum`) - #146976 (constify basic Clone impls) - #147249 (Do two passes of `handle_opaque_type_uses_next`) - #147266 (fix 2 search graph bugs) - #147497 (`proc_macro` cleanups (3/N)) - #147546 (Suppress unused_parens for labeled break) - #147548 (Fix ICE for never pattern as closure parameters) - #147594 (std: implement `pal::os::exit` for VEXos) - #147596 (Adjust the Arm targets in CI to reflect latest changes) - #147607 (GVN: Invalidate derefs at loop headers) - #147620 (Avoid redundant UB check in RangeFrom slice indexing) - #147647 (Hide vendoring and copyright in GHA group) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #147249 - jackh726:opaque-type-fallback, r=lcnr Do two passes of `handle_opaque_type_uses_next` Fixes rust-lang/trait-system-refactor-initiative#240 Also did a little bit of cleanup, can squash the commits if decided. r? lcnr
Bors hasn't noticed that this was merged. @bors r- |
Fixes rust-lang/trait-system-refactor-initiative#240
Also did a little bit of cleanup, can squash the commits if decided.
r? lcnr