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

make trait-aliases work across crates #57502

Merged
merged 3 commits into from Jan 19, 2019

Conversation

Projects
None yet
5 participants
@nikomatsakis
Copy link
Contributor

nikomatsakis commented Jan 10, 2019

This is rebase of a small part of @alexreg's PR #55994. It focuses just on the changes that integrate trait aliases properly into crate metadata, excluding the stylistic edits and the trait objects.

The stylistic edits I also rebased and can open a separate PR.

The trait object stuff I found challenging and decided it basically needed to be reimplemented. For now I've excluded it.

Since this is really @alexreg's work (I really just rebased) I am going to make it r=me once it is working.

Fixes #56488.
Fixes #57023.

nikomatsakis and others added some commits Jan 8, 2019

introduce `trait_def_id` method
Co-Authored-By: Alexander Regueiro <alexreg@me.com>
integrate trait aliases into def-paths / metadata
Co-authored-by: Alexander Regueiro <alexreg@me.com>
new trait alias tests
Co-authored-by: Alexander Regueiro <alexreg@me.com>
@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Jan 10, 2019

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Jan 10, 2019

r? @pnkfelix

(rust_highfive has picked a reviewer for you, use r? to override)

@alexreg

This comment has been minimized.

Copy link
Contributor

alexreg commented Jan 10, 2019

@nikomatsakis Okay, sounds fair. Re the trait object stuff, that needs some reworking, but I think the TraitAliasExpander code is essentially what we want. It's necessary to detect duplicate non-auto traits I think.

@alexreg
Copy link
Contributor

alexreg left a comment

Looks all good to me.

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Jan 11, 2019

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 11, 2019

📌 Commit b411994 has been approved by nikomatsakis

@nikomatsakis

This comment has been minimized.

Copy link
Contributor

nikomatsakis commented Jan 11, 2019

Re the trait object stuff, that needs some reworking, but I think the TraitAliasExpander code is essentially what we want. It's necessary to detect duplicate non-auto traits I think.

yep it's not that it needs major work, but I realized it would take me a bit longer so I thought I would pull the two changes apart and land this now

Centril added a commit to Centril/rust that referenced this pull request Jan 19, 2019

Rollup merge of rust-lang#57502 - nikomatsakis:fix-trait-alias-1b, r=…
…nikomatsakis

make trait-aliases work across crates

This is rebase of a small part of @alexreg's PR rust-lang#55994. It focuses just on the changes that integrate trait aliases properly into crate metadata, excluding the stylistic edits and the trait objects.

The stylistic edits I also rebased and can open a separate PR.

The trait object stuff I found challenging and decided it basically needed to be reimplemented. For now I've excluded it.

Since this is really @alexreg's work (I really just rebased) I am going to make it r=me once it is working.

Fixes rust-lang#56488.
Fixes rust-lang#57023.

bors added a commit that referenced this pull request Jan 19, 2019

Auto merge of #57755 - Centril:rollup, r=Centril
Rollup of 7 pull requests

Successful merges:

 - #57486 (Simplify `TokenStream` some more)
 - #57502 (make trait-aliases work across crates)
 - #57598 (Add missing unpretty option help message)
 - #57649 (privacy: Account for associated existential types)
 - #57659 (Fix release manifest generation)
 - #57699 (add applicability to remaining suggestions)
 - #57719 (Tweak `expand_node`)

Failed merges:

r? @ghost

@bors bors merged commit b411994 into rust-lang:master Jan 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment