mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Auto merge of #53075 - Mark-Simulacrum:update-cargolock, r=alexcrichton
Update Cargo.lock This also includes major version bumps for the rand crate used by core, std, and alloc tests, among other crates (regex, etc.) used elsewhere. Since these are all internal there should be no user-visible changes. r? @alexcrichton
This commit is contained in:
commit
0be2c30369
@ -12,7 +12,7 @@ version = "0.0.0"
|
||||
dependencies = [
|
||||
"compiler_builtins 0.0.0",
|
||||
"core 0.0.0",
|
||||
"rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -391,7 +391,7 @@ dependencies = [
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"miow 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustfix 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.75 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -421,7 +421,7 @@ dependencies = [
|
||||
name = "core"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -1092,6 +1092,15 @@ dependencies = [
|
||||
name = "linkchecker"
|
||||
version = "0.1.0"
|
||||
|
||||
[[package]]
|
||||
name = "lock_api"
|
||||
version = "0.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "log"
|
||||
version = "0.3.9"
|
||||
@ -1397,6 +1406,15 @@ dependencies = [
|
||||
"parking_lot_core 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "parking_lot"
|
||||
version = "0.6.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"lock_api 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parking_lot_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "parking_lot_core"
|
||||
version = "0.2.14"
|
||||
@ -1408,6 +1426,17 @@ dependencies = [
|
||||
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "parking_lot_core"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"smallvec 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "percent-encoding"
|
||||
version = "1.0.1"
|
||||
@ -1821,7 +1850,7 @@ dependencies = [
|
||||
"jobserver 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parking_lot 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"polonius-engine 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"proc_macro 0.0.0",
|
||||
"rustc-rayon 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -2072,6 +2101,7 @@ version = "0.0.0"
|
||||
dependencies = [
|
||||
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2081,7 +2111,7 @@ dependencies = [
|
||||
"cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ena 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parking_lot 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parking_lot_core 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-rayon 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -2131,10 +2161,11 @@ name = "rustc_errors"
|
||||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc_cratesio_shim 0.0.0",
|
||||
"rustc_data_structures 0.0.0",
|
||||
"serialize 0.0.0",
|
||||
"syntax_pos 0.0.0",
|
||||
"termcolor 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"termcolor 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
@ -2148,7 +2179,7 @@ version = "0.0.0"
|
||||
dependencies = [
|
||||
"graphviz 0.0.0",
|
||||
"log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc 0.0.0",
|
||||
"rustc_data_structures 0.0.0",
|
||||
"rustc_fs_util 0.0.0",
|
||||
@ -2580,7 +2611,7 @@ dependencies = [
|
||||
"panic_abort 0.0.0",
|
||||
"panic_unwind 0.0.0",
|
||||
"profiler_builtins 0.0.0",
|
||||
"rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rand 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc_asan 0.0.0",
|
||||
"rustc_lsan 0.0.0",
|
||||
"rustc_msan 0.0.0",
|
||||
@ -3156,6 +3187,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
"checksum libgit2-sys 0.7.7 (registry+https://github.com/rust-lang/crates.io-index)" = "6ab62b46003ba97701554631fa570d9f7e7947e2480ae3d941e555a54a2c0f05"
|
||||
"checksum libssh2-sys 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "10dbc0957a27626444f5a3f523e6b97a70c3d702999bf1c7161cfbe7a25a9368"
|
||||
"checksum libz-sys 1.0.20 (registry+https://github.com/rust-lang/crates.io-index)" = "f5f9aba969b3c45fe9c94bec65895868a9ceca9a600699f4054b75747a19c7c6"
|
||||
"checksum lock_api 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "949826a5ccf18c1b3a7c3d57692778d21768b79e46eb9dd07bfc4c2160036c54"
|
||||
"checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b"
|
||||
"checksum log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cba860f648db8e6f269df990180c2217f333472b4a6e901e97446858487971e2"
|
||||
"checksum log_settings 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "19af41f0565d7c19b2058153ad0b42d4d5ce89ec4dbf06ed6741114a8b63e7cd"
|
||||
@ -3188,7 +3220,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
"checksum ordslice 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dd20eec3dbe4376829cb7d80ae6ac45e0a766831dca50202ff2d40db46a8a024"
|
||||
"checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37"
|
||||
"checksum parking_lot 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d4d05f1349491390b1730afba60bb20d55761bef489a954546b58b4b34e1e2ac"
|
||||
"checksum parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0802bff09003b291ba756dc7e79313e51cc31667e94afbe847def490424cde5"
|
||||
"checksum parking_lot_core 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "4db1a8ccf734a7bce794cc19b3df06ed87ab2f3907036b693c68f56b4d4537fa"
|
||||
"checksum parking_lot_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "06a2b6aae052309c2fd2161ef58f5067bc17bb758377a0de9d4b279d603fdd8a"
|
||||
"checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831"
|
||||
"checksum pest 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0fce5d8b5cc33983fc74f78ad552b5522ab41442c4ca91606e4236eb4b5ceefc"
|
||||
"checksum pest_derive 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "ab94faafeb93f4c5e3ce81ca0e5a779529a602ad5d09ae6d21996bfb8b6a52bf"
|
||||
|
@ -14,7 +14,7 @@ core = { path = "../libcore" }
|
||||
compiler_builtins = { path = "../rustc/compiler_builtins_shim" }
|
||||
|
||||
[dev-dependencies]
|
||||
rand = "0.4"
|
||||
rand = "0.5"
|
||||
|
||||
[[test]]
|
||||
name = "collectionstests"
|
||||
|
@ -1222,7 +1222,7 @@ mod tests {
|
||||
use std::thread;
|
||||
use std::vec::Vec;
|
||||
|
||||
use rand::{thread_rng, Rng};
|
||||
use rand::{thread_rng, RngCore};
|
||||
|
||||
use super::{LinkedList, Node};
|
||||
|
||||
|
@ -18,7 +18,8 @@ use std::sync::atomic::Ordering::Relaxed;
|
||||
use std::sync::atomic::{ATOMIC_USIZE_INIT, AtomicUsize};
|
||||
use std::thread;
|
||||
|
||||
use rand::{Rng, thread_rng};
|
||||
use rand::{Rng, RngCore, thread_rng};
|
||||
use rand::distributions::Standard;
|
||||
|
||||
fn square(n: usize) -> usize {
|
||||
n * n
|
||||
@ -405,7 +406,7 @@ fn test_sort() {
|
||||
for len in (2..25).chain(500..510) {
|
||||
for &modulus in &[5, 10, 100, 1000] {
|
||||
for _ in 0..10 {
|
||||
let orig: Vec<_> = rng.gen_iter::<i32>()
|
||||
let orig: Vec<_> = rng.sample_iter::<i32, _>(&Standard)
|
||||
.map(|x| x % modulus)
|
||||
.take(len)
|
||||
.collect();
|
||||
|
@ -20,4 +20,4 @@ name = "corebenches"
|
||||
path = "../libcore/benches/lib.rs"
|
||||
|
||||
[dev-dependencies]
|
||||
rand = "0.4"
|
||||
rand = "0.5"
|
||||
|
@ -18,8 +18,8 @@ use core::num::flt2dec::strategy::grisu::format_exact_opt;
|
||||
use core::num::flt2dec::strategy::grisu::format_shortest_opt;
|
||||
use core::num::flt2dec::{decode, DecodableFloat, FullDecoded, Decoded};
|
||||
|
||||
use rand::{self, Rand, XorShiftRng};
|
||||
use rand::distributions::{IndependentSample, Range};
|
||||
use rand::{FromEntropy, XorShiftRng};
|
||||
use rand::distributions::{Distribution, Uniform};
|
||||
|
||||
pub fn decode_finite<T: DecodableFloat>(v: T) -> Decoded {
|
||||
match decode(v).1 {
|
||||
@ -71,10 +71,10 @@ fn iterate<F, G, V>(func: &str, k: usize, n: usize, mut f: F, mut g: G, mut v: V
|
||||
pub fn f32_random_equivalence_test<F, G>(f: F, g: G, k: usize, n: usize)
|
||||
where F: FnMut(&Decoded, &mut [u8]) -> Option<(usize, i16)>,
|
||||
G: FnMut(&Decoded, &mut [u8]) -> (usize, i16) {
|
||||
let mut rng: XorShiftRng = Rand::rand(&mut rand::thread_rng());
|
||||
let f32_range = Range::new(0x0000_0001u32, 0x7f80_0000);
|
||||
let mut rng = XorShiftRng::from_entropy();
|
||||
let f32_range = Uniform::new(0x0000_0001u32, 0x7f80_0000);
|
||||
iterate("f32_random_equivalence_test", k, n, f, g, |_| {
|
||||
let x = f32::from_bits(f32_range.ind_sample(&mut rng));
|
||||
let x = f32::from_bits(f32_range.sample(&mut rng));
|
||||
decode_finite(x)
|
||||
});
|
||||
}
|
||||
@ -82,10 +82,10 @@ pub fn f32_random_equivalence_test<F, G>(f: F, g: G, k: usize, n: usize)
|
||||
pub fn f64_random_equivalence_test<F, G>(f: F, g: G, k: usize, n: usize)
|
||||
where F: FnMut(&Decoded, &mut [u8]) -> Option<(usize, i16)>,
|
||||
G: FnMut(&Decoded, &mut [u8]) -> (usize, i16) {
|
||||
let mut rng: XorShiftRng = Rand::rand(&mut rand::thread_rng());
|
||||
let f64_range = Range::new(0x0000_0000_0000_0001u64, 0x7ff0_0000_0000_0000);
|
||||
let mut rng = XorShiftRng::from_entropy();
|
||||
let f64_range = Uniform::new(0x0000_0000_0000_0001u64, 0x7ff0_0000_0000_0000);
|
||||
iterate("f64_random_equivalence_test", k, n, f, g, |_| {
|
||||
let x = f64::from_bits(f64_range.ind_sample(&mut rng));
|
||||
let x = f64::from_bits(f64_range.sample(&mut rng));
|
||||
decode_finite(x)
|
||||
});
|
||||
}
|
||||
|
@ -802,11 +802,11 @@ fn test_rotate_right() {
|
||||
fn sort_unstable() {
|
||||
use core::cmp::Ordering::{Equal, Greater, Less};
|
||||
use core::slice::heapsort;
|
||||
use rand::{Rng, XorShiftRng};
|
||||
use rand::{FromEntropy, Rng, XorShiftRng};
|
||||
|
||||
let mut v = [0; 600];
|
||||
let mut tmp = [0; 600];
|
||||
let mut rng = XorShiftRng::new_unseeded();
|
||||
let mut rng = XorShiftRng::from_entropy();
|
||||
|
||||
for len in (2..25).chain(500..510) {
|
||||
let v = &mut v[0..len];
|
||||
|
@ -29,7 +29,7 @@ serialize = { path = "../libserialize" }
|
||||
syntax = { path = "../libsyntax" }
|
||||
syntax_pos = { path = "../libsyntax_pos" }
|
||||
backtrace = "0.3.3"
|
||||
parking_lot = "0.5.5"
|
||||
parking_lot = "0.6"
|
||||
byteorder = { version = "1.1", features = ["i128"]}
|
||||
chalk-engine = { version = "0.7.0", default-features=false }
|
||||
rustc_fs_util = { path = "../librustc_fs_util" }
|
||||
|
@ -9,7 +9,7 @@
|
||||
// except according to those terms.
|
||||
|
||||
use rustc_data_structures::indexed_vec::IndexVec;
|
||||
use rustc_data_structures::sync::{RwLock, ReadGuard};
|
||||
use rustc_data_structures::sync::{RwLock, MappedReadGuard, ReadGuard};
|
||||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher,
|
||||
StableHasherResult};
|
||||
use ich::StableHashingContext;
|
||||
@ -55,7 +55,10 @@ impl Cache {
|
||||
*self.predecessors.borrow_mut() = None;
|
||||
}
|
||||
|
||||
pub fn predecessors(&self, mir: &Mir) -> ReadGuard<IndexVec<BasicBlock, Vec<BasicBlock>>> {
|
||||
pub fn predecessors(
|
||||
&self,
|
||||
mir: &Mir
|
||||
) -> MappedReadGuard<IndexVec<BasicBlock, Vec<BasicBlock>>> {
|
||||
if self.predecessors.borrow().is_none() {
|
||||
*self.predecessors.borrow_mut() = Some(calculate_predecessors(mir));
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ use rustc_data_structures::graph::dominators::{dominators, Dominators};
|
||||
use rustc_data_structures::graph::{self, GraphPredecessors, GraphSuccessors};
|
||||
use rustc_data_structures::indexed_vec::{Idx, IndexVec};
|
||||
use rustc_data_structures::sync::Lrc;
|
||||
use rustc_data_structures::sync::ReadGuard;
|
||||
use rustc_data_structures::sync::MappedReadGuard;
|
||||
use rustc_serialize as serialize;
|
||||
use smallvec::SmallVec;
|
||||
use std::borrow::Cow;
|
||||
@ -194,13 +194,13 @@ impl<'tcx> Mir<'tcx> {
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn predecessors(&self) -> ReadGuard<'_, IndexVec<BasicBlock, Vec<BasicBlock>>> {
|
||||
pub fn predecessors(&self) -> MappedReadGuard<'_, IndexVec<BasicBlock, Vec<BasicBlock>>> {
|
||||
self.cache.predecessors(self)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn predecessors_for(&self, bb: BasicBlock) -> ReadGuard<'_, Vec<BasicBlock>> {
|
||||
ReadGuard::map(self.predecessors(), |p| &p[bb])
|
||||
pub fn predecessors_for(&self, bb: BasicBlock) -> MappedReadGuard<'_, Vec<BasicBlock>> {
|
||||
MappedReadGuard::map(self.predecessors(), |p| &p[bb])
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
@ -8,7 +8,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
use rustc_data_structures::sync::{RwLock, ReadGuard};
|
||||
use rustc_data_structures::sync::{RwLock, ReadGuard, MappedReadGuard};
|
||||
use std::mem;
|
||||
|
||||
/// The `Steal` struct is intended to used as the value for a query.
|
||||
@ -42,7 +42,7 @@ impl<T> Steal<T> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn borrow(&self) -> ReadGuard<T> {
|
||||
pub fn borrow(&self) -> MappedReadGuard<T> {
|
||||
ReadGuard::map(self.value.borrow(), |opt| match *opt {
|
||||
None => bug!("attempted to read from stolen value"),
|
||||
Some(ref v) => v
|
||||
|
@ -22,3 +22,4 @@ crate-type = ["dylib"]
|
||||
[dependencies]
|
||||
bitflags = "1.0"
|
||||
log = "0.4"
|
||||
unicode-width = "0.1.4"
|
||||
|
@ -16,3 +16,4 @@
|
||||
|
||||
extern crate bitflags;
|
||||
extern crate log;
|
||||
extern crate unicode_width;
|
||||
|
@ -22,5 +22,5 @@ rustc-hash = "1.0.1"
|
||||
smallvec = { version = "0.6.5", features = ["union"] }
|
||||
|
||||
[dependencies.parking_lot]
|
||||
version = "0.5"
|
||||
version = "0.6"
|
||||
features = ["nightly"]
|
||||
|
@ -93,8 +93,11 @@ cfg_if! {
|
||||
pub use std::rc::Rc as Lrc;
|
||||
pub use std::rc::Weak as Weak;
|
||||
pub use std::cell::Ref as ReadGuard;
|
||||
pub use std::cell::Ref as MappedReadGuard;
|
||||
pub use std::cell::RefMut as WriteGuard;
|
||||
pub use std::cell::RefMut as MappedWriteGuard;
|
||||
pub use std::cell::RefMut as LockGuard;
|
||||
pub use std::cell::RefMut as MappedLockGuard;
|
||||
|
||||
use std::cell::RefCell as InnerRwLock;
|
||||
use std::cell::RefCell as InnerLock;
|
||||
@ -213,9 +216,12 @@ cfg_if! {
|
||||
pub use std::marker::Sync as Sync;
|
||||
|
||||
pub use parking_lot::RwLockReadGuard as ReadGuard;
|
||||
pub use parking_lot::MappedRwLockReadGuard as MappedReadGuard;
|
||||
pub use parking_lot::RwLockWriteGuard as WriteGuard;
|
||||
pub use parking_lot::MappedRwLockWriteGuard as MappedWriteGuard;
|
||||
|
||||
pub use parking_lot::MutexGuard as LockGuard;
|
||||
pub use parking_lot::MappedMutexGuard as MappedLockGuard;
|
||||
|
||||
pub use std::sync::Arc as Lrc;
|
||||
pub use std::sync::Weak as Weak;
|
||||
|
@ -12,6 +12,7 @@ crate-type = ["dylib"]
|
||||
serialize = { path = "../libserialize" }
|
||||
syntax_pos = { path = "../libsyntax_pos" }
|
||||
rustc_data_structures = { path = "../librustc_data_structures" }
|
||||
rustc_cratesio_shim = { path = "../librustc_cratesio_shim" }
|
||||
unicode-width = "0.1.4"
|
||||
atty = "0.2"
|
||||
termcolor = "0.3"
|
||||
termcolor = "1.0"
|
||||
|
@ -11,7 +11,7 @@ crate-type = ["dylib"]
|
||||
[dependencies]
|
||||
graphviz = { path = "../libgraphviz" }
|
||||
log = "0.4"
|
||||
rand = "0.4"
|
||||
rand = "0.5"
|
||||
rustc = { path = "../librustc" }
|
||||
rustc_data_structures = { path = "../librustc_data_structures" }
|
||||
serialize = { path = "../libserialize" }
|
||||
|
@ -126,7 +126,7 @@ use std::mem;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::time::{UNIX_EPOCH, SystemTime, Duration};
|
||||
|
||||
use rand::{thread_rng, Rng};
|
||||
use rand::{RngCore, thread_rng};
|
||||
|
||||
const LOCK_FILE_EXT: &'static str = ".lock";
|
||||
const DEP_GRAPH_FILENAME: &'static str = "dep-graph.bin";
|
||||
|
@ -25,7 +25,7 @@ profiler_builtins = { path = "../libprofiler_builtins", optional = true }
|
||||
unwind = { path = "../libunwind" }
|
||||
|
||||
[dev-dependencies]
|
||||
rand = "0.4"
|
||||
rand = "0.5"
|
||||
|
||||
[target.x86_64-apple-darwin.dependencies]
|
||||
rustc_asan = { path = "../librustc_asan" }
|
||||
|
@ -2076,7 +2076,7 @@ mod tests {
|
||||
use fs::{self, File, OpenOptions};
|
||||
use io::{ErrorKind, SeekFrom};
|
||||
use path::Path;
|
||||
use rand::{StdRng, Rng};
|
||||
use rand::{StdRng, FromEntropy, RngCore};
|
||||
use str;
|
||||
use sys_common::io::test::{TempDir, tmpdir};
|
||||
use thread;
|
||||
@ -3110,7 +3110,7 @@ mod tests {
|
||||
#[test]
|
||||
fn binary_file() {
|
||||
let mut bytes = [0; 1024];
|
||||
StdRng::new().unwrap().fill_bytes(&mut bytes);
|
||||
StdRng::from_entropy().fill_bytes(&mut bytes);
|
||||
|
||||
let tmpdir = tmpdir();
|
||||
|
||||
@ -3123,7 +3123,7 @@ mod tests {
|
||||
#[test]
|
||||
fn write_then_read() {
|
||||
let mut bytes = [0; 1024];
|
||||
StdRng::new().unwrap().fill_bytes(&mut bytes);
|
||||
StdRng::from_entropy().fill_bytes(&mut bytes);
|
||||
|
||||
let tmpdir = tmpdir();
|
||||
|
||||
|
@ -597,7 +597,7 @@ mod tests {
|
||||
thread::spawn(move || {
|
||||
let mut rng = rand::thread_rng();
|
||||
for _ in 0..M {
|
||||
if rng.gen_weighted_bool(N) {
|
||||
if rng.gen_bool(1.0 / (N as f64)) {
|
||||
drop(r.write().unwrap());
|
||||
} else {
|
||||
drop(r.read().unwrap());
|
||||
|
@ -14,7 +14,7 @@ pub const DEFAULT_BUF_SIZE: usize = 8 * 1024;
|
||||
pub mod test {
|
||||
use path::{Path, PathBuf};
|
||||
use env;
|
||||
use rand::{self, Rng};
|
||||
use rand::{self, RngCore};
|
||||
use fs;
|
||||
|
||||
pub struct TempDir(PathBuf);
|
||||
|
@ -13,11 +13,12 @@ extern crate rand;
|
||||
use std::env::*;
|
||||
use std::ffi::{OsString, OsStr};
|
||||
|
||||
use rand::Rng;
|
||||
use rand::{thread_rng, Rng};
|
||||
use rand::distributions::Alphanumeric;
|
||||
|
||||
fn make_rand_name() -> OsString {
|
||||
let mut rng = rand::thread_rng();
|
||||
let n = format!("TEST{}", rng.gen_ascii_chars().take(10)
|
||||
let mut rng = thread_rng();
|
||||
let n = format!("TEST{}", rng.sample_iter(&Alphanumeric).take(10)
|
||||
.collect::<String>());
|
||||
let n = OsString::from(n);
|
||||
assert!(var_os(&n).is_none());
|
||||
|
@ -24,7 +24,7 @@ pub use self::ExpnFormat::*;
|
||||
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_data_structures::stable_hasher::StableHasher;
|
||||
use rustc_data_structures::sync::{Lrc, Lock, LockGuard};
|
||||
use rustc_data_structures::sync::{Lrc, Lock, LockGuard, MappedLockGuard};
|
||||
use std::cmp;
|
||||
use std::hash::Hash;
|
||||
use std::path::{Path, PathBuf};
|
||||
@ -194,7 +194,7 @@ impl SourceMap {
|
||||
Ok(self.new_source_file(filename, src))
|
||||
}
|
||||
|
||||
pub fn files(&self) -> LockGuard<Vec<Lrc<SourceFile>>> {
|
||||
pub fn files(&self) -> MappedLockGuard<Vec<Lrc<SourceFile>>> {
|
||||
LockGuard::map(self.files.borrow(), |files| &mut files.file_maps)
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@ env_logger = { version = "0.5", default-features = false }
|
||||
filetime = "0.2"
|
||||
getopts = "0.2"
|
||||
log = "0.4"
|
||||
regex = "0.2"
|
||||
regex = "1.0"
|
||||
serde = "1.0"
|
||||
serde_json = "1.0"
|
||||
serde_derive = "1.0"
|
||||
|
@ -91,6 +91,7 @@ static WHITELIST: &'static [Crate] = &[
|
||||
Crate("kernel32-sys"),
|
||||
Crate("lazy_static"),
|
||||
Crate("libc"),
|
||||
Crate("lock_api"),
|
||||
Crate("log"),
|
||||
Crate("log_settings"),
|
||||
Crate("memchr"),
|
||||
@ -102,8 +103,8 @@ static WHITELIST: &'static [Crate] = &[
|
||||
Crate("owning_ref"),
|
||||
Crate("parking_lot"),
|
||||
Crate("parking_lot_core"),
|
||||
Crate("polonius-engine"),
|
||||
Crate("pkg-config"),
|
||||
Crate("polonius-engine"),
|
||||
Crate("quick-error"),
|
||||
Crate("rand"),
|
||||
Crate("rand_core"),
|
||||
@ -134,6 +135,7 @@ static WHITELIST: &'static [Crate] = &[
|
||||
Crate("winapi"),
|
||||
Crate("winapi-build"),
|
||||
Crate("winapi-i686-pc-windows-gnu"),
|
||||
Crate("winapi-util"),
|
||||
Crate("winapi-x86_64-pc-windows-gnu"),
|
||||
Crate("wincolor"),
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user