2013-11-21 02:46:29 -06:00
|
|
|
// 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.
|
|
|
|
|
2014-12-27 18:20:47 -06:00
|
|
|
// ensure that the ThreadRng isn't/doesn't become accidentally sendable.
|
2013-11-21 02:46:29 -06:00
|
|
|
|
2016-02-22 16:33:38 -06:00
|
|
|
use std::rand; //~ ERROR: module `rand` is private
|
2014-03-01 18:23:04 -06:00
|
|
|
|
2013-11-21 02:46:29 -06:00
|
|
|
fn test_send<S: Send>() {}
|
|
|
|
|
|
|
|
pub fn main() {
|
2014-12-27 18:20:47 -06:00
|
|
|
test_send::<rand::ThreadRng>();
|
2016-03-29 12:12:31 -05:00
|
|
|
//~^ ERROR : std::marker::Send` is not satisfied
|
2013-11-21 02:46:29 -06:00
|
|
|
}
|