Skip to content

on-demand-ify custom_coerce_unsized_kind and inherent-impls - #40683

Merged
bors merged 3 commits into
rust-lang:masterfrom
nikomatsakis:incr-comp-coerce-unsized-info
Mar 29, 2017
Merged

on-demand-ify custom_coerce_unsized_kind and inherent-impls#40683
bors merged 3 commits into
rust-lang:masterfrom
nikomatsakis:incr-comp-coerce-unsized-info

Conversation

@nikomatsakis

Copy link
Copy Markdown
Contributor

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

@eddyb

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Mar 20, 2017

Copy link
Copy Markdown
Collaborator

📌 Commit 8effa01 has been approved by eddyb

@bors

bors commented Mar 20, 2017

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #39628) made this pull request unmergeable. Please resolve the merge conflicts.

@nikomatsakis
nikomatsakisforce-pushed the incr-comp-coerce-unsized-info branch from 8effa01 to 245d491CompareMarch 20, 2017 22:57
@nikomatsakisnikomatsakis changed the title convert custom_coerce_unsized_kind into a coerce_unsized_infoon-demand-ify custom_coerce_unsized_kind and inherent-implsMar 20, 2017
@nikomatsakis

Copy link
Copy Markdown
ContributorAuthor

@eddyb -- I added another commit, converting inherent-impl things.

r? on those commits.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this?

Copy link
Copy Markdown
ContributorAuthor

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.

Copy link
Copy Markdown
ContributorAuthor

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.

Copy link
Copy Markdown
Contributor

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?!

Copy link
Copy Markdown
ContributorAuthor

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.

Copy link
Copy Markdown
ContributorAuthor

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.

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
ContributorAuthor

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.

@nikomatsakis
nikomatsakisforce-pushed the incr-comp-coerce-unsized-info branch from 245d491 to ba85dc7CompareMarch 21, 2017 00:56
@nikomatsakis

Copy link
Copy Markdown
ContributorAuthor

@eddyb r? on the new changes

@eddyb

Copy link
Copy Markdown
Contributor

@bors r+

@bors

bors commented Mar 22, 2017

Copy link
Copy Markdown
Collaborator

📌 Commit ba85dc7 has been approved by eddyb

@bors

bors commented Mar 23, 2017

Copy link
Copy Markdown
Collaborator

☔ 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.
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.
@nikomatsakis
nikomatsakisforce-pushed the incr-comp-coerce-unsized-info branch from ba85dc7 to a29ae30CompareMarch 23, 2017 17:27
@nikomatsakis

Copy link
Copy Markdown
ContributorAuthor

@bors r=eddyb

@bors

bors commented Mar 23, 2017

Copy link
Copy Markdown
Collaborator

📌 Commit a29ae30 has been approved by eddyb

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Mar 25, 2017
…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
bors added a commit that referenced this pull request Mar 25, 2017
bors added a commit that referenced this pull request Mar 25, 2017
@bors

bors commented Mar 25, 2017

Copy link
Copy Markdown
Collaborator

⌛ Testing commit a29ae30 with merge 774298f...

@bors

bors commented Mar 25, 2017

Copy link
Copy Markdown
Collaborator

💔 Test failed - status-travis

@arielb1

Copy link
Copy Markdown
Contributor

@bors

bors commented Mar 25, 2017

Copy link
Copy Markdown
Collaborator

⌛ Testing commit a29ae30 with merge a7890df...

@bors

bors commented Mar 25, 2017

Copy link
Copy Markdown
Collaborator

💔 Test failed - status-travis

@arielb1

Copy link
Copy Markdown
Contributor

@bors

bors commented Mar 25, 2017

Copy link
Copy Markdown
Collaborator

⌛ Testing commit a29ae30 with merge 63c826f...

@bors

bors commented Mar 25, 2017

Copy link
Copy Markdown
Collaborator

💔 Test failed - status-travis

@arielb1

Copy link
Copy Markdown
Contributor

@bors

bors commented Mar 26, 2017

Copy link
Copy Markdown
Collaborator

⌛ Testing commit a29ae30 with merge 68c387c...

@bors

bors commented Mar 26, 2017

Copy link
Copy Markdown
Collaborator

💔 Test failed - status-appveyor

@nikomatsakis

Copy link
Copy Markdown
ContributorAuthor

Error in gdb. Seems unlikely to be related to this PR, but not impossible.

@nikomatsakis

Copy link
Copy Markdown
ContributorAuthor

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Mar 27, 2017
…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
bors added a commit that referenced this pull request Mar 27, 2017
bors added a commit that referenced this pull request Mar 28, 2017
@bors
bors merged commit a29ae30 into rust-lang:masterMar 29, 2017
@nikomatsakis
nikomatsakis deleted the incr-comp-coerce-unsized-info branch April 14, 2017 10:12
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@nikomatsakis@eddyb@bors@arielb1