Skip to content

Commit 5fc7f9e

Browse files
committed
---
yaml --- r: 150299 b: refs/heads/try2 c: fad7717 h: refs/heads/master i: 150297: b9b1a49 150295: 9ce8d11 v: v3
1 parent 0e029b5 commit 5fc7f9e

File tree

5 files changed

+40
-18
lines changed

5 files changed

+40
-18
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: a424e84a3e0157f3f0160ae366ba469457cb6295
8+
refs/heads/try2: fad77175e1811bdd0991ed00dc1a10ade8721a0b
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/libstd/io/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@ impl fmt::Show for IoError {
302302

303303
/// A list specifying general categories of I/O error.
304304
#[deriving(Eq, Clone, Show)]
305-
#[allow(missing_doc)]
306305
pub enum IoErrorKind {
307306
/// Any I/O error not part of this list.
308307
OtherIoError,
@@ -1428,7 +1427,6 @@ pub struct FileStat {
14281427
/// structure. This information is not necessarily platform independent, and may
14291428
/// have different meanings or no meaning at all on some platforms.
14301429
#[unstable]
1431-
#[allow(missing_doc)]
14321430
#[deriving(Hash)]
14331431
pub struct UnstableFileStat {
14341432
/// The ID of the device containing the file.

branches/try2/src/libstd/io/net/udp.rs

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
//! The destination and binding addresses can either be an IPv4 or IPv6
1515
//! address. There is no corresponding notion of a server because UDP is a
1616
//! datagram protocol.
17-
//!
18-
//! A UDP connection implements the `Reader` and `Writer` traits.
1917
2018
use clone::Clone;
2119
use result::{Ok, Err};
@@ -24,6 +22,36 @@ use io::{Reader, Writer, IoResult};
2422
use rt::rtio::{RtioSocket, RtioUdpSocket, IoFactory, LocalIo};
2523

2624
/// A User Datagram Protocol socket.
25+
///
26+
/// This is an implementation of a bound UDP socket. This supports both IPv4 and
27+
/// IPv6 addresses, and there is no corresponding notion of a server because UDP
28+
/// is a datagram protocol.
29+
///
30+
/// # Example
31+
///
32+
/// ```rust,no_run
33+
/// # #[allow(unused_must_use)];
34+
/// use std::io::net::udp::UdpSocket;
35+
/// use std::io::net::ip::{Ipv4Addr, SocketAddr};
36+
///
37+
/// let addr = SocketAddr { ip: Ipv4Addr(127, 0, 0, 1), port: 34254 };
38+
/// let mut socket = match UdpSocket::bind(addr) {
39+
/// Ok(s) => s,
40+
/// Err(e) => fail!("couldn't bind socket: {}", e),
41+
/// };
42+
///
43+
/// let mut buf = [0, ..10];
44+
/// match socket.recvfrom(buf) {
45+
/// Ok((amt, src)) => {
46+
/// // Send a reply to the socket we received data from
47+
/// let buf = buf.mut_slice_to(amt);
48+
/// buf.reverse();
49+
/// socket.sendto(buf, src);
50+
/// }
51+
/// Err(e) => println!("couldn't receive a datagram: {}", e)
52+
/// }
53+
/// drop(socket); // close the socket
54+
/// ```
2755
pub struct UdpSocket {
2856
priv obj: ~RtioUdpSocket
2957
}

branches/try2/src/libstd/num/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -340,11 +340,11 @@ pub enum FPCategory {
340340
}
341341

342342
/// Operations on primitive floating point numbers.
343-
///
344-
/// TODO(#5527): In a future version of Rust, many of these functions will become constants.
345-
///
346-
/// FIXME(#8888): Several of these functions have a parameter named `unused_self`. Removing it
347-
/// requires #8888 to be fixed.
343+
// FIXME(#5527): In a future version of Rust, many of these functions will
344+
// become constants.
345+
//
346+
// FIXME(#8888): Several of these functions have a parameter named
347+
// `unused_self`. Removing it requires #8888 to be fixed.
348348
pub trait Float: Signed + Round + Primitive {
349349
/// Returns the maximum of the two numbers.
350350
fn max(self, other: Self) -> Self;

branches/try2/src/libstd/os.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -367,18 +367,16 @@ pub fn unsetenv(n: &str) {
367367
}
368368

369369
/// A low-level OS in-memory pipe.
370-
///
371-
/// This type is deprecated in favor of the types in `std::io::pipe`.
372370
pub struct Pipe {
373-
/// A file descriptor representing the input end of the pipe.
371+
/// A file descriptor representing the reading end of the pipe. Data written
372+
/// on the `out` file descriptor can be read from this file descriptor.
374373
input: c_int,
375-
/// A file descriptor representing the output end of the pipe.
374+
/// A file descriptor representing the write end of the pipe. Data written
375+
/// to this file descriptor can be read from the `input` file descriptor.
376376
out: c_int,
377377
}
378378

379379
/// Creates a new low-level OS in-memory pipe.
380-
///
381-
/// This function is deprecated in favor of the types in `std::io::pipe`.
382380
#[cfg(unix)]
383381
pub fn pipe() -> Pipe {
384382
unsafe {
@@ -390,8 +388,6 @@ pub fn pipe() -> Pipe {
390388
}
391389

392390
/// Creates a new low-level OS in-memory pipe.
393-
///
394-
/// This function is deprecated in favor of the types in `std::io::pipe`.
395391
#[cfg(windows)]
396392
pub fn pipe() -> Pipe {
397393
unsafe {

0 commit comments

Comments
 (0)