Upgrade rust/crates/rand to 0.8.2

Test: make
Change-Id: I2131add04c4bbd0517a4e2bea853c76a551788ee
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index 37219d9..2e6810b 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,5 +1,5 @@
 {
   "git": {
-    "sha1": "98a1aaf28e7bc272c12796d96401c177bf2205e4"
+    "sha1": "6a6b9fd06dbf54538d250dfbc4c918f79daa9299"
   }
 }
diff --git a/Android.bp b/Android.bp
index f489cd6..00b010f 100644
--- a/Android.bp
+++ b/Android.bp
@@ -24,9 +24,9 @@
 }
 
 // dependent_library ["feature_list"]
-//   cfg-if-0.1.10
-//   getrandom-0.2.0 "std"
-//   libc-0.2.81
+//   cfg-if-1.0.0
+//   getrandom-0.2.1 "std"
+//   libc-0.2.82
 //   ppv-lite86-0.2.10 "simd,std"
 //   rand_chacha-0.3.0 "std"
-//   rand_core-0.6.0 "alloc,getrandom,std"
+//   rand_core-0.6.1 "alloc,getrandom,std"
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c4815bb..c049530 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,15 @@
 
 You may also find the [Upgrade Guide](https://rust-random.github.io/book/update.html) useful.
 
+## [0.8.2] - 2021-01-12
+### Fixes
+- Fix panic in `UniformInt::sample_single_inclusive` and `Rng::gen_range` when
+  providing a full integer range (eg `0..=MAX`) (#1087)
+
+## [0.8.1] - 2020-12-31
+### Other
+- Enable all stable features in the playground (#1081)
+
 ## [0.8.0] - 2020-12-18
 ### Platform support
 - The minimum supported Rust version is now 1.36 (#1011)
diff --git a/Cargo.lock b/Cargo.lock
index be7d3a4..81bbd9c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -35,9 +35,9 @@
 
 [[package]]
 name = "libc"
-version = "0.2.76"
+version = "0.2.81"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "755456fae044e6fa1ebbbd1b3e902ae19e73097ed4ed87bb79934a867c007bc3"
+checksum = "1482821306169ec4d07f6aca392a4681f66c75c9918aa49641a2595db64053cb"
 
 [[package]]
 name = "libm"
@@ -72,9 +72,9 @@
 
 [[package]]
 name = "proc-macro2"
-version = "1.0.19"
+version = "1.0.24"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "04f5f085b5d71e2188cb8271e5da0161ad52c3f227a661a3c135fdf28e258b12"
+checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71"
 dependencies = [
  "unicode-xid",
 ]
@@ -90,7 +90,7 @@
 
 [[package]]
 name = "rand"
-version = "0.8.0"
+version = "0.8.2"
 dependencies = [
  "bincode",
  "libc",
@@ -115,9 +115,9 @@
 
 [[package]]
 name = "rand_core"
-version = "0.6.0"
+version = "0.6.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a8b34ba8cfb21243bd8df91854c830ff0d785fff2e82ebd4434c2644cb9ada18"
+checksum = "c026d7df8b298d90ccbbc5190bd04d85e159eaf5576caeacf8741da93ccbd2e5"
 dependencies = [
  "getrandom",
 ]
@@ -142,18 +142,18 @@
 
 [[package]]
 name = "serde"
-version = "1.0.115"
+version = "1.0.118"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e54c9a88f2da7238af84b5101443f0c0d0a3bbdc455e34a5c9497b1903ed55d5"
+checksum = "06c64263859d87aa2eb554587e2d23183398d617427327cf2b3d0ed8c69e4800"
 dependencies = [
  "serde_derive",
 ]
 
 [[package]]
 name = "serde_derive"
-version = "1.0.115"
+version = "1.0.118"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "609feed1d0a73cc36a0182a840a9b37b4a82f0b1150369f0536a9e3f2a31dc48"
+checksum = "c84d3526699cd55261af4b941e4e725444df67aa4f9e6a3564f18030d12672df"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -162,9 +162,9 @@
 
 [[package]]
 name = "syn"
-version = "1.0.39"
+version = "1.0.54"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "891d8d6567fe7c7f8835a3a98af4208f3846fba258c1bc3c31d6e506239f11f9"
+checksum = "9a2af957a63d6bd42255c359c93d9bfdb97076bd3b820897ce55ffbfbf107f44"
 dependencies = [
  "proc-macro2",
  "quote",
diff --git a/Cargo.toml b/Cargo.toml
index e44e775..adbcc4c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,7 +13,7 @@
 [package]
 edition = "2018"
 name = "rand"
-version = "0.8.0"
+version = "0.8.2"
 authors = ["The Rand Project Developers", "The Rust Project Developers"]
 include = ["src/", "LICENSE-*", "README.md", "CHANGELOG.md", "COPYRIGHT"]
 autobenches = true
@@ -28,6 +28,9 @@
 [package.metadata.docs.rs]
 all-features = true
 rustdoc-args = ["--cfg", "doc_cfg"]
+
+[package.metadata.playground]
+features = ["small_rng", "serde1"]
 [dependencies.log]
 version = "0.4.4"
 optional = true
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index aee917c..69a6844 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,6 +1,6 @@
 [package]
 name = "rand"
-version = "0.8.0"
+version = "0.8.2"
 authors = ["The Rand Project Developers", "The Rust Project Developers"]
 license = "MIT OR Apache-2.0"
 readme = "README.md"
@@ -85,3 +85,6 @@
 # RUSTDOCFLAGS="--cfg doc_cfg" cargo +nightly doc --all-features --no-deps --open
 all-features = true
 rustdoc-args = ["--cfg", "doc_cfg"]
+
+[package.metadata.playground]
+features = ["small_rng", "serde1"]
diff --git a/METADATA b/METADATA
index af9a0a8..f07b101 100644
--- a/METADATA
+++ b/METADATA
@@ -7,13 +7,13 @@
   }
   url {
     type: ARCHIVE
-    value: "https://static.crates.io/crates/rand/rand-0.8.0.crate"
+    value: "https://static.crates.io/crates/rand/rand-0.8.2.crate"
   }
-  version: "0.8.0"
+  version: "0.8.2"
   license_type: NOTICE
   last_upgrade_date {
-    year: 2020
-    month: 12
-    day: 22
+    year: 2021
+    month: 1
+    day: 13
   }
 }
diff --git a/src/distributions/uniform.rs b/src/distributions/uniform.rs
index bbd9694..e4a6407 100644
--- a/src/distributions/uniform.rs
+++ b/src/distributions/uniform.rs
@@ -521,6 +521,12 @@
                 let high = *high_b.borrow();
                 assert!(low <= high, "UniformSampler::sample_single_inclusive: low > high");
                 let range = high.wrapping_sub(low).wrapping_add(1) as $unsigned as $u_large;
+                // If the above resulted in wrap-around to 0, the range is $ty::MIN..=$ty::MAX,
+                // and any integer will do.
+                if range == 0 {
+                    return rng.gen();
+                }
+
                 let zone = if ::core::$unsigned::MAX <= ::core::u16::MAX as $unsigned {
                     // Using a modulus is faster than the approximation for
                     // i8 and i16. I suppose we trade the cost of one
@@ -1235,6 +1241,11 @@
                         let v = <$ty as SampleUniform>::Sampler::sample_single(low, high, &mut rng);
                         assert!($le(low, v) && $lt(v, high));
                     }
+
+                    for _ in 0..1000 {
+                        let v = <$ty as SampleUniform>::Sampler::sample_single_inclusive(low, high, &mut rng);
+                        assert!($le(low, v) && $le(v, high));
+                    }
                 }
             }};