Skip to content

Commit 131c274

Browse files
committed
---
yaml --- r: 211031 b: refs/heads/try c: b748c2e h: refs/heads/master i: 211029: 9698ca9 211027: 8f6cf81 211023: d8b0359 v: v3
1 parent e970e5a commit 131c274

File tree

7 files changed

+17
-30
lines changed

7 files changed

+17
-30
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 3e561f05c00cd180ec02db4ccab2840a4aba93d2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: ba0e1cd8147d452c356aacb29fb87568ca26f111
5-
refs/heads/try: 07c25d4ca0751e4244fe92626c2b351c849e3add
5+
refs/heads/try: b748c2e90d87985fbff1d99e17d94a10cf2b3f21
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/src/doc/trpl/dining-philosophers.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@ called ‘the dining philosophers’. It was originally conceived by Dijkstra in
77
[paper]: http://www.usingcsp.com/cspbook.pdf
88

99
> In ancient times, a wealthy philanthropist endowed a College to accommodate
10-
> five eminent philosophers. Each philosopher had a room in which he could
11-
> engage in his professional activity of thinking; there was also a common
10+
> five eminent philosophers. Each philosopher had a room in which she could
11+
> engage in her professional activity of thinking; there was also a common
1212
> dining room, furnished with a circular table, surrounded by five chairs, each
1313
> labelled by the name of the philosopher who was to sit in it. They sat
1414
> anticlockwise around the table. To the left of each philosopher there was
1515
> laid a golden fork, and in the centre stood a large bowl of spaghetti, which
16-
> was constantly replenished. A philosopher was expected to spend most of his
17-
> time thinking; but when he felt hungry, he went to the dining room, sat down
18-
> in his own chair, picked up his own fork on his left, and plunged it into the
16+
> was constantly replenished. A philosopher was expected to spend most of her
17+
> time thinking; but when she felt hungry, she went to the dining room, sat down
18+
> in her own chair, picked up her own fork on her left, and plunged it into the
1919
> spaghetti. But such is the tangled nature of spaghetti that a second fork is
2020
> required to carry it to the mouth. The philosopher therefore had also to pick
21-
> up the fork on his right. When he was finished he would put down both his
22-
> forks, get up from his chair, and continue thinking. Of course, a fork can be
23-
> used by only one philosopher at a time. If the other philosopher wants it, he
21+
> up the fork on her right. When she was finished she would put down both her
22+
> forks, get up from her chair, and continue thinking. Of course, a fork can be
23+
> used by only one philosopher at a time. If the other philosopher wants it, she
2424
> just has to wait until the fork is available again.
2525
2626
This classic problem shows off a few different elements of concurrency. The

branches/try/src/libcore/num/mod.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,15 @@ macro_rules! int_impl {
132132
///
133133
/// Leading and trailing whitespace represent an error.
134134
///
135-
/// # Examples
135+
/// # Arguments
136136
///
137-
/// ```
138-
/// assert_eq!(u32::from_str_radix("A", 16), Some(10));
139-
/// ```
137+
/// * src - A string slice
138+
/// * radix - The base to use. Must lie in the range [2 .. 36]
139+
///
140+
/// # Return value
141+
///
142+
/// `Err(ParseIntError)` if the string did not represent a valid number.
143+
/// Otherwise, `Ok(n)` where `n` is the integer represented by `src`.
140144
#[stable(feature = "rust1", since = "1.0.0")]
141145
#[allow(deprecated)]
142146
pub fn from_str_radix(src: &str, radix: u32) -> Result<$T, ParseIntError> {

branches/try/src/libstd/process.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -456,12 +456,6 @@ impl Child {
456456
unsafe { self.handle.kill() }
457457
}
458458

459-
/// Returns the OS-assigned process identifier associated with this child.
460-
#[unstable(feature = "process_id", reason = "api recently added")]
461-
pub fn id(&self) -> u32 {
462-
self.handle.id()
463-
}
464-
465459
/// Waits for the child to exit completely, returning the status that it
466460
/// exited with. This function will continue to have the same return value
467461
/// after it has been called at least once.

branches/try/src/libstd/sys/unix/process.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -315,10 +315,6 @@ impl Process {
315315
fail(&mut output)
316316
}
317317

318-
pub fn id(&self) -> u32 {
319-
self.pid as u32
320-
}
321-
322318
pub fn wait(&self) -> io::Result<ExitStatus> {
323319
let mut status = 0 as c_int;
324320
try!(cvt_r(|| unsafe { c::waitpid(self.pid, &mut status, 0) }));

branches/try/src/libstd/sys/windows/c.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,6 @@ extern "system" {
482482
dwMilliseconds: libc::DWORD) -> libc::DWORD;
483483
pub fn SwitchToThread() -> libc::BOOL;
484484
pub fn Sleep(dwMilliseconds: libc::DWORD);
485-
pub fn GetProcessId(handle: libc::HANDLE) -> libc::DWORD;
486485
}
487486

488487
#[link(name = "userenv")]

branches/try/src/libstd/sys/windows/process.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -193,12 +193,6 @@ impl Process {
193193
Ok(())
194194
}
195195

196-
pub fn id(&self) -> u32 {
197-
unsafe {
198-
c::GetProcessId(self.handle.raw()) as u32
199-
}
200-
}
201-
202196
pub fn wait(&self) -> io::Result<ExitStatus> {
203197
use libc::{STILL_ACTIVE, INFINITE, WAIT_OBJECT_0};
204198
use libc::{GetExitCodeProcess, WaitForSingleObject};

0 commit comments

Comments
 (0)