-
Notifications
You must be signed in to change notification settings - Fork 13.4k
on-demand-ify custom_coerce_unsized_kind
and inherent-impls
#40683
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
on-demand-ify custom_coerce_unsized_kind
and inherent-impls
#40683
Conversation
@bors r+ |
📌 Commit 8effa01 has been approved by |
☔ The latest upstream changes (presumably #39628) made this pull request unmergeable. Please resolve the merge conflicts. |
8effa01
to
245d491
Compare
custom_coerce_unsized_kind
into a coerce_unsized_info
custom_coerce_unsized_kind
and inherent-impls
@eddyb -- I added another commit, converting inherent-impl things. r? on those commits. |
let mut collect = InherentCollect { tcx }; | ||
krate.visit_all_item_likes(&mut collect); | ||
|
||
herent |
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.
What's this?
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.
yeah, what is that? weird.
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.
oh, that file never got removed...it was supposed to be.
match self_ty.sty { | ||
ty::TyAdt(def, _) => { | ||
self.check_def_id(item, def.did); | ||
} |
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.
This isn't moved from anywhere else?!
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 is, not sure why git didn't figure it out. I split up inherent.rs
into two files, since it was doing two things.
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 guess I could keep it together. Might be cleaner diff.
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.
What I mean is, you don't have a negative diff on inherent.rs
matching the positive diff.
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.
yeah, it's because inherent.rs
is all dead now. just pushed a revised version which deleted it.
245d491
to
ba85dc7
Compare
@eddyb r? on the new changes |
@bors r+ |
📌 Commit ba85dc7 has been approved by |
☔ The latest upstream changes (presumably #40758) made this pull request unmergeable. Please resolve the merge conflicts. |
This "on-demand" task both checks for errors and computes the custom unsized kind, if any. This task is only defined on impls of `CoerceUnsized`; invoking it on any other kind of impl results in a bug. This is just to avoid having an `Option`, could easily be changed.
Top-down, top-down!
There are now 3 queries: - inherent_impls(def-id): for a given type, get a `Rc<Vec<DefId>>` with all its inherent impls. This internally uses `crate_inherent_impls`, doing some hacks to keep the current deps (which, btw, are not clearly correct). - crate_inherent_impls(crate): gathers up a map from types to `Rc<Vec<DefId>>`, touching the entire krate, possibly generating errors. - crate_inherent_impls_overlap_check(crate): performs overlap checks between the inherent impls for a given type, generating errors.
ba85dc7
to
a29ae30
Compare
@bors r=eddyb |
📌 Commit a29ae30 has been approved by |
…ed-info, r=eddyb on-demand-ify `custom_coerce_unsized_kind` and `inherent-impls` This "on-demand" task both checks for errors and computes the custom unsized kind, if any. This task is only defined on impls of `CoerceUnsized`; invoking it on any other kind of impl results in a bug. This is just to avoid having an `Option`, could easily be changed. r? @eddyb
⌛ Testing commit a29ae30 with merge 774298f... |
💔 Test failed - status-travis |
⌛ Testing commit a29ae30 with merge a7890df... |
💔 Test failed - status-travis |
⌛ Testing commit a29ae30 with merge 63c826f... |
💔 Test failed - status-travis |
⌛ Testing commit a29ae30 with merge 68c387c... |
💔 Test failed - status-appveyor |
Error in gdb. Seems unlikely to be related to this PR, but not impossible. |
…ed-info, r=eddyb on-demand-ify `custom_coerce_unsized_kind` and `inherent-impls` This "on-demand" task both checks for errors and computes the custom unsized kind, if any. This task is only defined on impls of `CoerceUnsized`; invoking it on any other kind of impl results in a bug. This is just to avoid having an `Option`, could easily be changed. r? @eddyb
This "on-demand" task both checks for errors and computes the custom unsized kind, if any. This task is only defined on impls of
CoerceUnsized
; invoking it on any other kind of impl results in a bug. This is just to avoid having anOption
, could easily be changed.r? @eddyb