Skip to content

Remove core::any::AnyPrivate #17745

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

Merged
merged 2 commits into from
Oct 7, 2014
Merged

Conversation

aturon
Copy link
Member

@aturon aturon commented Oct 3, 2014

Previously, the Any trait was split into a private portion and an (empty) public portion, in order to hide the implementation strategy used for downcasting. However, the new rules for privacy forbid AnyPrivate from actually being private.

This patch thus reverts the introduction of AnyPrivate.

Although this is unlikely to break any real code, it removes a public trait and is therefore a:

[breaking-change]

@aturon
Copy link
Member Author

aturon commented Oct 3, 2014

Note that this affects a #[stable] trait as well, but due to the blanket impl cannot effect any implementors or clients.

@aturon
Copy link
Member Author

aturon commented Oct 3, 2014

We should consider whether there is some other means of hiding the get_type_id method.

@sinistersnare
Copy link
Contributor

(another reason why we should not be marking things stable pre-1.0)

@aturon
Copy link
Member Author

aturon commented Oct 6, 2014

This error appears to be spurious; I've rebased and successfully performed make check locally. Retrying.

aturon added 2 commits October 6, 2014 16:32
[Previously](rust-lang@e5da6a7),
the `Any` trait was split into a private portion and an (empty) public
portion, in order to hide the implementation strategy used for
downcasting. However, the [new
rules](rust-lang@e9ad12c)
for privacy forbid `AnyPrivate` from actually being private.

This patch thus reverts the introduction of `AnyPrivate`.

Although this is unlikely to break any real code, it removes a public
trait and is therefore a:

[breaking-change]
@aturon aturon force-pushed the revert-any-private branch from cba4cc3 to d007d44 Compare October 6, 2014 23:32
bors added a commit that referenced this pull request Oct 7, 2014
[Previously](e5da6a7), the `Any` trait was split into a private portion and an (empty) public portion, in order to hide the implementation strategy used for downcasting. However, the [new rules](e9ad12c) for privacy forbid `AnyPrivate` from actually being private.

This patch thus reverts the introduction of `AnyPrivate`.

Although this is unlikely to break any real code, it removes a public trait and is therefore a:

[breaking-change]
@bors bors closed this Oct 7, 2014
@bors bors merged commit d007d44 into rust-lang:master Oct 7, 2014
lnicola pushed a commit to lnicola/rust that referenced this pull request Aug 13, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants