Skip to content

alloc: Don't run some Arc doc tests #23775

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 28, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/liballoc/arc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
//!
//! Sharing some immutable data between tasks:
//!
//! ```
//! ```no_run
//! use std::sync::Arc;
//! use std::thread;
//!
Expand All @@ -50,7 +50,7 @@
//!
//! Sharing mutable data safely between tasks with a `Mutex`:
//!
//! ```
//! ```no_run
//! use std::sync::{Arc, Mutex};
//! use std::thread;
//!
Expand Down
16 changes: 7 additions & 9 deletions src/test/run-pass/spawn-fn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,21 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(std_misc)]
use std::thread;

use std::thread::Thread;

fn x(s: String, n: int) {
fn x(s: String, n: isize) {
println!("{}", s);
println!("{}", n);
}

pub fn main() {
let _t = Thread::spawn(|| x("hello from first spawned fn".to_string(), 65) );
let _t = Thread::spawn(|| x("hello from second spawned fn".to_string(), 66) );
let _t = Thread::spawn(|| x("hello from third spawned fn".to_string(), 67) );
let mut i: int = 30;
let _t = thread::scoped(|| x("hello from first spawned fn".to_string(), 65) );
let _t = thread::scoped(|| x("hello from second spawned fn".to_string(), 66) );
let _t = thread::scoped(|| x("hello from third spawned fn".to_string(), 67) );
let mut i = 30;
while i > 0 {
i = i - 1;
println!("parent sleeping");
Thread::yield_now();
thread::yield_now();
}
}