diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-08-04 18:00:53 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-08-04 18:00:53 +0530 |
| commit | 0bf16ffe1c67c623f324a83d2350f5b3469ef158 (patch) | |
| tree | 41b3732d49f37bdc6ebcacf06df1276c980d10f2 | |
| parent | 6be272cff53072fd2ba81e80da07ec653d10c51a (diff) | |
| parent | c5d877977a3d89ad9763b734405be41e3a041dcc (diff) | |
| download | rust-0bf16ffe1c67c623f324a83d2350f5b3469ef158.tar.gz rust-0bf16ffe1c67c623f324a83d2350f5b3469ef158.zip | |
Rollup merge of #27498 - nagisa:eeeeeeh, r=Gankro
r? @Gankro
| -rw-r--r-- | src/libcore/mem.rs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs index 3b321d43b3d..7e63c8d71f9 100644 --- a/src/libcore/mem.rs +++ b/src/libcore/mem.rs @@ -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 { |
