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

privacy: Account for associated existential types #57649

Merged
merged 1 commit into from Jan 19, 2019

Conversation

Projects
None yet
4 participants
@petrochenkov
Copy link
Contributor

petrochenkov commented Jan 15, 2019

Turns out they can be associated (but only in impls, not traits).
Fixes #53546 (comment)

r? @arielb1

@arielb1

This comment has been minimized.

Copy link
Contributor

arielb1 commented Jan 17, 2019

I hate this kind of patchwork! I suppose that's what happens when I have no idea on how existential types work.

Show resolved Hide resolved src/librustc_privacy/lib.rs Outdated
Show resolved Hide resolved src/librustc_privacy/lib.rs Outdated
@arielb1

This comment has been minimized.

Copy link
Contributor

arielb1 commented Jan 17, 2019

r=me with using exhaustive matches, which should catch any sillinesss that might happen if someone refactors these enums.

@petrochenkov petrochenkov force-pushed the petrochenkov:privexist branch from 004af87 to ee86eae Jan 17, 2019

@petrochenkov petrochenkov force-pushed the petrochenkov:privexist branch from ee86eae to d34b3e9 Jan 17, 2019

@petrochenkov

This comment has been minimized.

Copy link
Contributor Author

petrochenkov commented Jan 17, 2019

Exhaustive matches are added and factored into a separate function.

@bors r=arielb1

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jan 17, 2019

📌 Commit d34b3e9 has been approved by arielb1

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

Rollup merge of rust-lang#57649 - petrochenkov:privexist, r=arielb1
privacy: Account for associated existential types

Turns out they *can* be associated (but only in impls, not traits).
Fixes rust-lang#53546 (comment)

r? @arielb1

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

Auto merge of #57727 - Centril:rollup, r=Centril
Rollup of 22 pull requests

Successful merges:

 - #56594 (Remove confusing comment about ideally using `!` for `c_void`)
 - #57107 (Add a regression test for mutating a non-mut #[thread_local])
 - #57340 (Use correct tracking issue for c_variadic)
 - #57357 (Cleanup PartialEq docs.)
 - #57370 (Support passing cflags/cxxflags/ldflags to LLVM build)
 - #57475 (Add signed num::NonZeroI* types)
 - #57501 (High priority resolutions for associated variants)
 - #57551 (resolve: Add a test for issue #57539)
 - #57610 (Fix nested `?` matchers)
 - #57634 (Remove an unused function argument)
 - #57635 (use structured macro and path resolve suggestions)
 - #57636 (Fix sources sidebar not showing up)
 - #57646 (Fixes text becoming invisible when element targetted)
 - #57649 (privacy: Account for associated existential types)
 - #57650 (librustc_metadata: Pass a default value when unwrapping a span)
 - #57654 (Add some links in std::fs.)
 - #57658 (Two HIR tweaks)
 - #57659 (Fix release manifest generation)
 - #57683 (Document Unpin in std::prelude documentation)
 - #57685 (Enhance `Pin` impl applicability for `PartialEq` and `PartialOrd`.)
 - #57698 (Fix typo bug in DepGraph::try_mark_green().)
 - #57720 (Fix suggestions given mulitple bad lifetimes)

Failed merges:

r? @ghost

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

Rollup merge of rust-lang#57649 - petrochenkov:privexist, r=arielb1
privacy: Account for associated existential types

Turns out they *can* be associated (but only in impls, not traits).
Fixes rust-lang#53546 (comment)

r? @arielb1

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 d34b3e9 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