diff options
| author | bors <bors@rust-lang.org> | 2017-11-09 18:14:48 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-11-09 18:14:48 +0000 |
| commit | f1ea23e2cc72cafad1dc25a06c09ec2de8e323eb (patch) | |
| tree | 4bafb2a94c6755051649f9e6cfca17c0312712ab /src/test | |
| parent | 98e791e7e135ef6526ca97c33fcf8cd0db50320f (diff) | |
| parent | 5c3fe111d4a6e72f0461320f5166bcd6aaf2f37f (diff) | |
| download | rust-f1ea23e2cc72cafad1dc25a06c09ec2de8e323eb.tar.gz rust-f1ea23e2cc72cafad1dc25a06c09ec2de8e323eb.zip | |
Auto merge of #45725 - alexcrichton:std-less-rand, r=dtolnay
Working towards a libc-less (wasm32) libstd This is a series of commits I was able to extract from prepare to comiple libstd on a "bare libc-less" target, notably wasm32. The actual wasm32 bits I intend to send in a PR later, this is just some internal refactorings required for libstd to work with a `libc` that's empty and a few other assorted refactorings. No functional change should be included in this PR for users of libstd, this is intended to just be internal refactorings.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/compile-fail/task-rng-isnt-sendable.rs | 21 | ||||
| -rw-r--r-- | src/test/run-pass-fulldeps/binary-heap-panic-safe.rs (renamed from src/test/run-pass/binary-heap-panic-safe.rs) | 6 | ||||
| -rw-r--r-- | src/test/run-pass-fulldeps/env.rs (renamed from src/test/run-pass/env.rs) | 7 | ||||
| -rw-r--r-- | src/test/run-pass-fulldeps/vector-sort-panic-safe.rs (renamed from src/test/run-pass/vector-sort-panic-safe.rs) | 6 |
4 files changed, 12 insertions, 28 deletions
diff --git a/src/test/compile-fail/task-rng-isnt-sendable.rs b/src/test/compile-fail/task-rng-isnt-sendable.rs deleted file mode 100644 index d85717f8ce5..00000000000 --- a/src/test/compile-fail/task-rng-isnt-sendable.rs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -#![feature(rand)] - -// ensure that the ThreadRng isn't/doesn't become accidentally sendable. - -use std::__rand::ThreadRng; - -fn test_send<S: Send>() {} - -pub fn main() { - test_send::<ThreadRng>(); //~ ERROR std::marker::Send` is not satisfied -} diff --git a/src/test/run-pass/binary-heap-panic-safe.rs b/src/test/run-pass-fulldeps/binary-heap-panic-safe.rs index 93d3345a809..6139a7d3201 100644 --- a/src/test/run-pass/binary-heap-panic-safe.rs +++ b/src/test/run-pass-fulldeps/binary-heap-panic-safe.rs @@ -8,9 +8,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(rand, std_panic)] +#![feature(rustc_private, std_panic)] -use std::__rand::{thread_rng, Rng}; +extern crate rand; + +use rand::{thread_rng, Rng}; use std::panic::{self, AssertUnwindSafe}; use std::collections::BinaryHeap; diff --git a/src/test/run-pass/env.rs b/src/test/run-pass-fulldeps/env.rs index e602fb2d7d2..cf2ea732ee1 100644 --- a/src/test/run-pass/env.rs +++ b/src/test/run-pass-fulldeps/env.rs @@ -10,14 +10,15 @@ // compile-flags: --test -#![feature(rand, std_panic)] +#![feature(rustc_private, std_panic)] + +extern crate rand; use std::env::*; -use std::__rand as rand; -use std::__rand::Rng; use std::iter::repeat; use std::ffi::{OsString, OsStr}; +use rand::Rng; fn make_rand_name() -> OsString { let mut rng = rand::thread_rng(); diff --git a/src/test/run-pass/vector-sort-panic-safe.rs b/src/test/run-pass-fulldeps/vector-sort-panic-safe.rs index c6a1859de30..82305045f80 100644 --- a/src/test/run-pass/vector-sort-panic-safe.rs +++ b/src/test/run-pass-fulldeps/vector-sort-panic-safe.rs @@ -10,11 +10,13 @@ // ignore-emscripten no threads support -#![feature(rand)] +#![feature(rustc_private)] #![feature(sort_unstable)] #![feature(const_atomic_usize_new)] -use std::__rand::{thread_rng, Rng}; +extern crate rand; + +use rand::{thread_rng, Rng}; use std::cell::Cell; use std::cmp::Ordering; use std::panic; |
