Skip to content

Post merge changes to #27488 #27498

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

Merged
merged 1 commit into from
Aug 4, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions src/libcore/mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,20 +322,16 @@ pub unsafe fn dropped<T>() -> T {
/// println!("{:?}", &data[0]);
/// ```
///
/// Hopefully this example emphasizes to you exactly how delicate
/// and dangerous doing this is. Note that the `vec!` macro
/// *does* let you initialize every element with a value that
/// is only `Clone`, so the following is equivalent and vastly
/// less dangerous, as long as you can live with an extra heap
/// This example emphasizes exactly how delicate and dangerous doing this is.
/// Note that the `vec!` macro *does* let you initialize every element with a
/// value that is only `Clone`, so the following is semantically equivalent and
/// vastly less dangerous, as long as you can live with an extra heap
/// allocation:
///
/// ```
/// let data: Vec<Vec<u32>> = vec![Vec::new(); 1000];
/// println!("{:?}", &data[0]);
/// ```
///
/// For large arrays this is probably advisable
/// anyway to avoid blowing the stack.
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
pub unsafe fn uninitialized<T>() -> T {
Expand Down