Skip to content
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

std: Second pass stabilization for boxed #20420

Merged
merged 1 commit into from
Jan 2, 2015

Conversation

alexcrichton
Copy link
Member

This commit performs a second pass over the std::boxed module, taking the
following actions:

  • boxed is now stable
  • Box is now stable
  • BoxAny is removed in favor of a direct impl Box<Any>
  • Box::downcast remains unstable while the name of the downcast family of
    methods is determined.

This is a breaking change due to the removal of the BoxAny trait (note that
the downcast method still exists), and existing consumers of BoxAny simply
need to remove the import in their modules.

[breaking-change]

This commit performs a second pass over the `std::boxed` module, taking the
following actions:

* `boxed` is now stable
* `Box` is now stable
* `BoxAny` is removed in favor of a direct `impl Box<Any>`
* `Box::downcast` remains unstable while the name of the `downcast` family of
  methods is determined.

This is a breaking change due to the removal of the `BoxAny` trait (note that
the `downcast` method still exists), and existing consumers of `BoxAny` simply
need to remove the import in their modules.

[breaking-change]
@rust-highfive
Copy link
Collaborator

r? @pcwalton

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

@alexcrichton
Copy link
Member Author

r? @aturon

@aturon
Copy link
Member

aturon commented Jan 2, 2015

cc @japaric @eddyb

@aturon
Copy link
Member

aturon commented Jan 2, 2015

The only thing I don't like here is boxed, but we were never able to come up with something better. Ah well.

@eddyb
Copy link
Member

eddyb commented Jan 2, 2015

@aturon btw, I figured we don't need to move ty_uniq fully into the libraries, but only teach coherence about it (and where it lives).
I think resolve does the right thing already, since it works before Box<T> is desugared into ~T.
We can also do this for all built-in types, using something like #[lang="uint"] enum uint {}, and then put everything in an inherent impl.

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Jan 2, 2015
@bors bors merged commit f2ccdfd into rust-lang:master Jan 2, 2015
@alexcrichton alexcrichton deleted the second-pass-boxed branch January 3, 2015 00:01
Sign up for free to 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.

None yet

6 participants