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

Make syntax::owned_slice a Box<[T]> wrapper. #19326

Merged
merged 1 commit into from
Nov 27, 2014
Merged

Conversation

huonw
Copy link
Member

@huonw huonw commented Nov 26, 2014

This makes it correct (e.g. avoiding null pointers) and safe.

This makes it correct (e.g. avoiding null pointers) and safe.
@@ -85,6 +85,7 @@
#[doc(no_inline)] pub use slice::{SlicePrelude, AsSlice, CloneSlicePrelude};
#[doc(no_inline)] pub use slice::{VectorVector, PartialEqSlicePrelude, OrdSlicePrelude};
#[doc(no_inline)] pub use slice::{CloneSliceAllocPrelude, OrdSliceAllocPrelude, SliceAllocPrelude};
#[doc(no_inline)] pub use slice::{BoxedSlicePrelude};
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need this in the prelude?

Copy link
Member Author

Choose a reason for hiding this comment

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

I assumed that the Prelude name meant it was just an oversight that it wasn't added to the prelude.

Copy link
Member

Choose a reason for hiding this comment

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

fair enough

@eddyb
Copy link
Member

eddyb commented Nov 26, 2014

Can it be just a type alias? Or even replace occurrences of it with Box<[T]>?

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Nov 27, 2014
This makes it correct (e.g. avoiding null pointers) and safe.
@bors bors merged commit 4653ad0 into rust-lang:master Nov 27, 2014
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.

4 participants