Skip to content

Commit 973b672

Browse files
committed
---
yaml --- r: 232681 b: refs/heads/try c: bc35734 h: refs/heads/master i: 232679: 6926085 v: v3
1 parent 32be370 commit 973b672

File tree

4 files changed

+45
-3
lines changed

4 files changed

+45
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: edeb4f1c86cbf6af8ef9874d4b3af50f721ea1b8
33
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4-
refs/heads/try: 06563fe0b7d64b7552d65a7ab00aa360820f05c5
4+
refs/heads/try: bc3573470f009fa078fe063700b8df2854e8499e
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

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

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515
1616
use prelude::v1::*;
1717

18-
use str::FromStr;
18+
use error::Error;
19+
use fmt;
1920
use net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV4, SocketAddrV6};
21+
use str::FromStr;
2022

2123
struct Parser<'a> {
2224
// parsing as ASCII, so can use byte array
@@ -339,3 +341,17 @@ impl FromStr for SocketAddr {
339341
#[stable(feature = "rust1", since = "1.0.0")]
340342
#[derive(Debug, Clone, PartialEq)]
341343
pub struct AddrParseError(());
344+
345+
#[stable(feature = "addr_parse_error_error", since = "1.4.0")]
346+
impl fmt::Display for AddrParseError {
347+
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
348+
fmt.write_str(self.description())
349+
}
350+
}
351+
352+
#[stable(feature = "addr_parse_error_error", since = "1.4.0")]
353+
impl Error for AddrParseError {
354+
fn description(&self) -> &str {
355+
"invalid IP address syntax"
356+
}
357+
}

branches/try/src/libsyntax/ext/deriving/generic/mod.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,13 @@ impl<'a> TraitDef<'a> {
617617
attr::mark_used(&attr);
618618
let opt_trait_ref = Some(trait_ref);
619619
let ident = ast_util::impl_pretty_name(&opt_trait_ref, Some(&*self_type));
620-
let mut a = vec![attr];
620+
let unused_qual = cx.attribute(
621+
self.span,
622+
cx.meta_list(self.span,
623+
InternedString::new("allow"),
624+
vec![cx.meta_word(self.span,
625+
InternedString::new("unused_qualifications"))]));
626+
let mut a = vec![attr, unused_qual];
621627
a.extend(self.attributes.iter().cloned());
622628
cx.item(
623629
self.span,
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
#![deny(unused_qualifications)]
12+
13+
use self::A::B;
14+
15+
#[derive(PartialEq)]
16+
pub enum A {
17+
B,
18+
}
19+
20+
fn main() {}

0 commit comments

Comments
 (0)