Skip to content

Commit 351dedb

Browse files
committed
---
yaml --- r: 191711 b: refs/heads/tmp c: 97f03e7 h: refs/heads/master i: 191709: aa3b18d 191707: 603f67f 191703: c5f1d8d 191695: ccc0cdd 191679: 3728b34 v: v3
1 parent 1d0dbcf commit 351dedb

File tree

4 files changed

+12
-38
lines changed

4 files changed

+12
-38
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3434
refs/heads/beta: 522d09dfecbeca1595f25ac58c6d0178bbd21d7d
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
37-
refs/heads/tmp: fda8673531c2ecea13c86216f964feb6091b4ade
37+
refs/heads/tmp: 97f03e7ad91cec9715fefbc8112519bd7c01e756
3838
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3939
refs/tags/homu-tmp: 4a5101a42f8ea36bdbe14749e672ab78cb971726

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

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -345,16 +345,6 @@ pub trait Int
345345

346346
/// Saturating integer addition. Computes `self + other`, saturating at
347347
/// the numeric bounds instead of overflowing.
348-
///
349-
/// # Examples
350-
///
351-
/// ```
352-
/// use std::num::Int;
353-
///
354-
/// assert_eq!(5u16.saturating_add(65534), 65535);
355-
/// assert_eq!((-5i16).saturating_add(-32767), -32768);
356-
/// assert_eq!(100u32.saturating_add(4294967294), 4294967295);
357-
/// ```
358348
#[stable(feature = "rust1", since = "1.0.0")]
359349
#[inline]
360350
fn saturating_add(self, other: Self) -> Self {
@@ -367,16 +357,6 @@ pub trait Int
367357

368358
/// Saturating integer subtraction. Computes `self - other`, saturating at
369359
/// the numeric bounds instead of overflowing.
370-
///
371-
/// # Examples
372-
///
373-
/// ```
374-
/// use std::num::Int;
375-
///
376-
/// assert_eq!(5u16.saturating_sub(65534), 0);
377-
/// assert_eq!(5i16.saturating_sub(-32767), 32767);
378-
/// assert_eq!(100u32.saturating_sub(4294967294), 0);
379-
/// ```
380360
#[stable(feature = "rust1", since = "1.0.0")]
381361
#[inline]
382362
fn saturating_sub(self, other: Self) -> Self {

branches/tmp/src/libstd/net/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ pub use self::ip::{Ipv4Addr, Ipv6Addr, Ipv6MulticastScope};
2525
pub use self::addr::{SocketAddr, SocketAddrV4, SocketAddrV6, ToSocketAddrs};
2626
pub use self::tcp::{TcpStream, TcpListener};
2727
pub use self::udp::UdpSocket;
28-
pub use self::parser::AddrParseError;
2928

3029
mod ip;
3130
mod addr;

branches/tmp/src/libstd/net/parser.rs

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -296,40 +296,35 @@ impl<'a> Parser<'a> {
296296
}
297297
}
298298

299-
#[stable(feature = "rust1", since = "1.0.0")]
300299
impl FromStr for Ipv4Addr {
301-
type Err = AddrParseError;
302-
fn from_str(s: &str) -> Result<Ipv4Addr, AddrParseError> {
300+
type Err = ParseError;
301+
fn from_str(s: &str) -> Result<Ipv4Addr, ParseError> {
303302
match Parser::new(s).read_till_eof(|p| p.read_ipv4_addr()) {
304303
Some(s) => Ok(s),
305-
None => Err(AddrParseError(()))
304+
None => Err(ParseError)
306305
}
307306
}
308307
}
309308

310-
#[stable(feature = "rust1", since = "1.0.0")]
311309
impl FromStr for Ipv6Addr {
312-
type Err = AddrParseError;
313-
fn from_str(s: &str) -> Result<Ipv6Addr, AddrParseError> {
310+
type Err = ParseError;
311+
fn from_str(s: &str) -> Result<Ipv6Addr, ParseError> {
314312
match Parser::new(s).read_till_eof(|p| p.read_ipv6_addr()) {
315313
Some(s) => Ok(s),
316-
None => Err(AddrParseError(()))
314+
None => Err(ParseError)
317315
}
318316
}
319317
}
320318

321-
#[stable(feature = "rust1", since = "1.0.0")]
322319
impl FromStr for SocketAddr {
323-
type Err = AddrParseError;
324-
fn from_str(s: &str) -> Result<SocketAddr, AddrParseError> {
320+
type Err = ParseError;
321+
fn from_str(s: &str) -> Result<SocketAddr, ParseError> {
325322
match Parser::new(s).read_till_eof(|p| p.read_socket_addr()) {
326323
Some(s) => Ok(s),
327-
None => Err(AddrParseError(())),
324+
None => Err(ParseError),
328325
}
329326
}
330327
}
331328

332-
/// An error returned when parsing an IP address or a socket address.
333-
#[stable(feature = "rust1", since = "1.0.0")]
334-
#[derive(Debug, Clone, PartialEq)]
335-
pub struct AddrParseError(());
329+
#[derive(Debug, Clone, PartialEq, Copy)]
330+
pub struct ParseError;

0 commit comments

Comments
 (0)