Merge pull request #327 from pitdicker/rand_core_rename

Rename rand-core to rand_core
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9f748e6..2c03338 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,7 +4,7 @@
 The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 
-A [separate changelog is kept for rand-core](rand-core/CHANGELOG.md).
+A [separate changelog is kept for rand_core](rand_core/CHANGELOG.md).
 
 You may also find the [Update Guide](UPDATING.md) useful.
 
@@ -13,7 +13,7 @@
 
 ### Crate features and organisation
 - Minimum Rust version update: 1.22.0. (#239)
-- Create a seperate `rand-core` crate. (#288)
+- Create a seperate `rand_core` crate. (#288)
 - Deprecate `rand_derive`. (#256)
 - Add `log` feature. Logging is now available in `JitterRng`, `OsRng`, `EntropyRng` and `ReseedingRng`. (#246)
 - Add `serde-1` feature for some PRNGs. (#189)
@@ -29,9 +29,9 @@
 - Deprecate `Rng::gen_iter`. (#286)
 - Deprecate `Rng::gen_ascii_chars`. (#279)
 
-### `rand-core` crate
+### `rand_core` crate
 (changes included here because they greatly influence the Rand crate)
-- `RngCore` and `SeedableRng` are now part of `rand-core`. (#288)
+- `RngCore` and `SeedableRng` are now part of `rand_core`. (#288)
 - Add modules to help implementing RNGs `impl` and `le`. (#209, #228)
 - Add `Error` and `ErrorKind`. (#225)
 - Add `CryptoRng` marker trait. (#273)
diff --git a/Cargo.toml b/Cargo.toml
index e75b9e3..371a596 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -17,8 +17,8 @@
 default = ["std"]
 nightly = ["i128_support"] # enables all features requiring nightly rust
 
-std = ["rand-core/std", "winapi", "libc"] # default feature; without this rand uses libcore
-alloc = ["rand-core/alloc"]  # enables Vec and Box support without std
+std = ["rand_core/std", "winapi", "libc"] # default feature; without this rand uses libcore
+alloc = ["rand_core/alloc"]  # enables Vec and Box support without std
 
 i128_support = [] # enables i128 and u128 support
 
@@ -32,7 +32,7 @@
 winapi = { version = "0.3", features = ["minwindef", "ntsecapi", "profileapi", "winnt"], optional = true }
 
 [dependencies]
-rand-core = { path = 'rand-core', default-features = false }
+rand_core = { path = 'rand_core', default-features = false }
 
 log = { version = "0.4", optional = true }
 
@@ -40,7 +40,7 @@
 serde_derive = {version="1", optional=true}
 
 [workspace]
-members = ["rand-core"]
+members = ["rand_core"]
 
 [dev-dependencies]
 # This is for testing serde, unfortunately
diff --git a/UPDATING.md b/UPDATING.md
index 6f02807..967814b 100644
--- a/UPDATING.md
+++ b/UPDATING.md
@@ -13,11 +13,11 @@
 
 ### Crates
 
-We have a new crate: `rand-core`! This crate houses some important traits,
+We have a new crate: `rand_core`! This crate houses some important traits,
 `RngCore`, `BlockRngCore`, `SeedableRng` and `CryptoRng`, the error types, as
 well as two modules with helpers for implementations: `le` and `impls`. It is
-recommended that implementations of generators use the `rand-core` trait while
-other users use only the `rand` crate, which re-exports most parts of `rand-core`.
+recommended that implementations of generators use the `rand_core` trait while
+other users use only the `rand` crate, which re-exports most parts of `rand_core`.
 
 The `rand_derive` crate has been deprecated due to very low usage and
 deprecation of `Rand`.
@@ -36,7 +36,7 @@
 by generators) and a "front end" `Rng` implementing all the convenient extension
 methods.
 
-Implementations of generators must `impl RngCore` instead. Usage of `rand-core`
+Implementations of generators must `impl RngCore` instead. Usage of `rand_core`
 for implementations is encouraged; the `rand_core::{le, impls}` modules may
 prove useful.
 
@@ -109,7 +109,7 @@
 
 #### Block-based PRNGs
 
-rand-core has a new helper trait, `BlockRngCore`, and implementation,
+rand_core has a new helper trait, `BlockRngCore`, and implementation,
 `BlockRng`. These are for use by generators which generate a block of random
 data at a time instead of word-sized values. Using this trait and implementation
 has two advantages: optimised `RngCore` methods are provided, and the PRNG can
diff --git a/rand-core/CHANGELOG.md b/rand_core/CHANGELOG.md
similarity index 87%
rename from rand-core/CHANGELOG.md
rename to rand_core/CHANGELOG.md
index f41b9bb..e52cfcb 100644
--- a/rand-core/CHANGELOG.md
+++ b/rand_core/CHANGELOG.md
@@ -6,10 +6,8 @@
 
 
 ## [0.1.0] - Unreleased
-
-### `rand-core` crate
 (Split out of the Rand crate, changes here are relative to rand 0.4.2)
-- `RngCore` and `SeedableRng` are now part of `rand-core`. (#288)
+- `RngCore` and `SeedableRng` are now part of `rand_core`. (#288)
 - Add modules to help implementing RNGs `impl` and `le`. (#209, #228)
 - Add `Error` and `ErrorKind`. (#225)
 - Add `CryptoRng` marker trait. (#273)
@@ -19,5 +17,5 @@
 - Remove default implementations for `RngCore::next_u64` and `RngCore::fill_bytes`. (#288)
 - Add `RngCore::try_fill_bytes`. (#225)
 
-## [0.0.1] - 2017-09-14
+## [0.0.1] - 2017-09-14 (yanked)
 Experimental version as part of the rand crate refactor.
diff --git a/rand-core/Cargo.toml b/rand_core/Cargo.toml
similarity index 82%
rename from rand-core/Cargo.toml
rename to rand_core/Cargo.toml
index ba748f0..57cf5e3 100644
--- a/rand-core/Cargo.toml
+++ b/rand_core/Cargo.toml
@@ -1,12 +1,12 @@
 [package]
-name = "rand-core"
+name = "rand_core"
 version = "0.1.0-pre.0"
 authors = ["The Rust Project Developers"]
 license = "MIT/Apache-2.0"
 readme = "README.md"
 repository = "https://github.com/rust-lang-nursery/rand"
-documentation = "https://docs.rs/rand-core"
-homepage = "https://crates.io/crates/rand-core"
+documentation = "https://docs.rs/rand_core"
+homepage = "https://crates.io/crates/rand_core"
 description = """
 Core random number generator traits and tools for implementation.
 """
diff --git a/rand-core/LICENSE-APACHE b/rand_core/LICENSE-APACHE
similarity index 100%
rename from rand-core/LICENSE-APACHE
rename to rand_core/LICENSE-APACHE
diff --git a/rand-core/LICENSE-MIT b/rand_core/LICENSE-MIT
similarity index 100%
rename from rand-core/LICENSE-MIT
rename to rand_core/LICENSE-MIT
diff --git a/rand-core/README.md b/rand_core/README.md
similarity index 94%
rename from rand-core/README.md
rename to rand_core/README.md
index 20823d1..34c92b6 100644
--- a/rand-core/README.md
+++ b/rand_core/README.md
@@ -1,4 +1,4 @@
-rand-core
+rand_core
 ====
 
 Core traits and error types of the [rand] library, plus tools for implementing
@@ -14,7 +14,7 @@
 point, list permutations and secure initialisation of RNGs). Most users should
 prefer to use the main [rand] crate.
 
-[Documentation](https://docs.rs/rand-core)
+[Documentation](https://docs.rs/rand_core)
 
 [rand]: ../README.md
 
diff --git a/rand-core/src/error.rs b/rand_core/src/error.rs
similarity index 100%
rename from rand-core/src/error.rs
rename to rand_core/src/error.rs
diff --git a/rand-core/src/impls.rs b/rand_core/src/impls.rs
similarity index 100%
rename from rand-core/src/impls.rs
rename to rand_core/src/impls.rs
diff --git a/rand-core/src/le.rs b/rand_core/src/le.rs
similarity index 100%
rename from rand-core/src/le.rs
rename to rand_core/src/le.rs
diff --git a/rand-core/src/lib.rs b/rand_core/src/lib.rs
similarity index 99%
rename from rand-core/src/lib.rs
rename to rand_core/src/lib.rs
index e11b3e7..2dd200f 100644
--- a/rand-core/src/lib.rs
+++ b/rand_core/src/lib.rs
@@ -30,7 +30,7 @@
 
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk.png",
        html_favicon_url = "https://www.rust-lang.org/favicon.ico",
-       html_root_url = "https://docs.rs/rand-core/0.1")]
+       html_root_url = "https://docs.rs/rand_core/0.1")]
 
 #![deny(missing_debug_implementations)]
 
diff --git a/src/lib.rs b/src/lib.rs
index 37ef5f2..08ea352 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -269,7 +269,7 @@
 
 use core::{marker, mem, slice};
 
-// re-exports from rand-core
+// re-exports from rand_core
 pub use rand_core::{RngCore, BlockRngCore, CryptoRng, SeedableRng};
 pub use rand_core::{ErrorKind, Error};
 
@@ -391,7 +391,7 @@
 /// }
 /// ```
 /// 
-/// [`RngCore`]: https://docs.rs/rand-core/0.1/rand-core/trait.RngCore.html
+/// [`RngCore`]: https://docs.rs/rand_core/0.1/rand_core/trait.RngCore.html
 pub trait Rng: RngCore {
     /// Fill `dest` entirely with random bytes (uniform value distribution),
     /// where `dest` is any type supporting [`AsByteSliceMut`], namely slices
@@ -413,7 +413,7 @@
     /// thread_rng().try_fill(&mut arr[..]);
     /// ```
     /// 
-    /// [`fill_bytes`]: https://docs.rs/rand-core/0.1/rand-core/trait.RngCore.html#method.fill_bytes
+    /// [`fill_bytes`]: https://docs.rs/rand_core/0.1/rand_core/trait.RngCore.html#method.fill_bytes
     /// [`try_fill`]: trait.Rng.html#method.try_fill
     /// [`AsByteSliceMut`]: trait.AsByteSliceMut.html
     fn fill<T: AsByteSliceMut + ?Sized>(&mut self, dest: &mut T) {
@@ -448,8 +448,8 @@
     /// # try_inner().unwrap()
     /// ```
     /// 
-    /// [`ErrorKind`]: https://docs.rs/rand-core/0.1/rand-core/enum.ErrorKind.html
-    /// [`try_fill_bytes`]: https://docs.rs/rand-core/0.1/rand-core/trait.RngCore.html#method.try_fill_bytes
+    /// [`ErrorKind`]: https://docs.rs/rand_core/0.1/rand_core/enum.ErrorKind.html
+    /// [`try_fill_bytes`]: https://docs.rs/rand_core/0.1/rand_core/trait.RngCore.html#method.try_fill_bytes
     /// [`fill`]: trait.Rng.html#method.fill
     /// [`AsByteSliceMut`]: trait.AsByteSliceMut.html
     fn try_fill<T: AsByteSliceMut + ?Sized>(&mut self, dest: &mut T) -> Result<(), Error> {
@@ -803,8 +803,8 @@
 /// println!("Random die roll: {}", rng.gen_range(1, 7));
 /// ```
 ///
-/// [`SeedableRng`]: https://docs.rs/rand-core/0.1/rand-core/trait.SeedableRng.html
-/// [`SeedableRng::from_seed`]: https://docs.rs/rand-core/0.1/rand-core/trait.SeedableRng.html#tymethod.from_seed
+/// [`SeedableRng`]: https://docs.rs/rand_core/0.1/rand_core/trait.SeedableRng.html
+/// [`SeedableRng::from_seed`]: https://docs.rs/rand_core/0.1/rand_core/trait.SeedableRng.html#tymethod.from_seed
 #[cfg(feature="std")]
 pub trait NewRng: SeedableRng {
     /// Creates a new instance, automatically seeded with fresh entropy.