Skip to content

Commit e15f78b

Browse files
committed
---
yaml --- r: 114421 b: refs/heads/master c: 33573bc h: refs/heads/master i: 114419: fe6ce2d v: v3
1 parent 8c212ba commit e15f78b

File tree

15 files changed

+62
-285
lines changed

15 files changed

+62
-285
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 0dd4c1e7bd0178ca91ea13dfad6efc4cce728302
2+
refs/heads/master: 33573bc0aaec14c55adbe6be314f761f34f8cdd0
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: ec0258a381b88b5574e3f8ce72ae553ac3a574b7
55
refs/heads/try: 7c6c492fb2af9a85f21ff952942df3523b22fd17

trunk/src/librustc/middle/privacy.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,10 @@ impl<'a> SanePrivacyVisitor<'a> {
10941094
check_inherited(m.span, m.vis,
10951095
"unnecessary visibility");
10961096
}
1097-
ast::Required(..) => {}
1097+
ast::Required(ref m) => {
1098+
check_inherited(m.span, m.vis,
1099+
"unnecessary visibility");
1100+
}
10981101
}
10991102
}
11001103
}

trunk/src/librustdoc/html/highlight.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ fn doit(sess: &parse::ParseSess, mut lexer: lexer::StringReader, class: Option<&
102102

103103
// miscellaneous, no highlighting
104104
t::DOT | t::DOTDOT | t::DOTDOTDOT | t::COMMA | t::SEMI |
105-
t::COLON | t::MOD_SEP | t::LARROW | t::DARROW | t::LPAREN |
105+
t::COLON | t::MOD_SEP | t::LARROW | t::LPAREN |
106106
t::RPAREN | t::LBRACKET | t::LBRACE | t::RBRACE => "",
107107
t::DOLLAR => {
108108
if t::is_ident(&lexer.peek().tok) {

trunk/src/libsyntax/ast.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,7 @@ pub struct TypeMethod {
689689
pub explicit_self: ExplicitSelf,
690690
pub id: NodeId,
691691
pub span: Span,
692+
pub vis: Visibility,
692693
}
693694

694695
// A trait method is either required (meaning it doesn't have an

trunk/src/libsyntax/ast_util.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ pub fn trait_method_to_ty_method(method: &TraitMethod) -> TypeMethod {
305305
explicit_self: m.explicit_self,
306306
id: m.id,
307307
span: m.span,
308+
vis: m.vis,
308309
}
309310
}
310311
}

trunk/src/libsyntax/ext/quote.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,6 @@ fn mk_token(cx: &ExtCtxt, sp: Span, tok: &token::Token) -> @ast::Expr {
543543
MOD_SEP => "MOD_SEP",
544544
RARROW => "RARROW",
545545
LARROW => "LARROW",
546-
DARROW => "DARROW",
547546
FAT_ARROW => "FAT_ARROW",
548547
LPAREN => "LPAREN",
549548
RPAREN => "RPAREN",

trunk/src/libsyntax/fold.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,7 @@ pub fn noop_fold_type_method<T: Folder>(m: &TypeMethod, fld: &mut T) -> TypeMeth
648648
generics: fold_generics(&m.generics, fld),
649649
explicit_self: fld.fold_explicit_self(&m.explicit_self),
650650
span: fld.new_span(m.span),
651+
vis: m.vis,
651652
}
652653
}
653654

trunk/src/libsyntax/parse/lexer.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -790,10 +790,7 @@ fn next_token_inner(rdr: &mut StringReader) -> token::Token {
790790
'<' => { return binop(rdr, token::SHL); }
791791
'-' => {
792792
bump(rdr);
793-
match rdr.curr.unwrap_or('\x00') {
794-
'>' => { bump(rdr); return token::DARROW; }
795-
_ => { return token::LARROW; }
796-
}
793+
return token::LARROW;
797794
}
798795
_ => { return token::LT; }
799796
}

trunk/src/libsyntax/parse/obsolete.rs

Lines changed: 0 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,6 @@ use parse::token;
2525
/// The specific types of unsupported syntax
2626
#[deriving(Eq, TotalEq, Hash)]
2727
pub enum ObsoleteSyntax {
28-
ObsoleteSwap,
29-
ObsoleteUnsafeBlock,
30-
ObsoleteBareFnType,
31-
ObsoleteMultipleLocalDecl,
32-
ObsoleteUnsafeExternFn,
33-
ObsoleteTraitFuncVisibility,
34-
ObsoleteConstPointer,
35-
ObsoleteLoopAsContinue,
36-
ObsoleteEnumWildcard,
37-
ObsoleteStructWildcard,
38-
ObsoleteVecDotDotWildcard,
39-
ObsoleteMultipleImport,
40-
ObsoleteManagedPattern,
41-
ObsoleteManagedString,
42-
ObsoleteManagedVec,
4328
ObsoleteOwnedType,
4429
ObsoleteOwnedExpr,
4530
ObsoleteOwnedPattern,
@@ -64,71 +49,6 @@ impl<'a> ParserObsoleteMethods for Parser<'a> {
6449
/// Reports an obsolete syntax non-fatal error.
6550
fn obsolete(&mut self, sp: Span, kind: ObsoleteSyntax) {
6651
let (kind_str, desc) = match kind {
67-
ObsoleteSwap => (
68-
"swap",
69-
"use std::mem::{swap, replace} instead"
70-
),
71-
ObsoleteUnsafeBlock => (
72-
"non-standalone unsafe block",
73-
"use an inner `unsafe { ... }` block instead"
74-
),
75-
ObsoleteBareFnType => (
76-
"bare function type",
77-
"use `|A| -> B` or `extern fn(A) -> B` instead"
78-
),
79-
ObsoleteMultipleLocalDecl => (
80-
"declaration of multiple locals at once",
81-
"instead of e.g. `let a = 1, b = 2`, write \
82-
`let (a, b) = (1, 2)`."
83-
),
84-
ObsoleteUnsafeExternFn => (
85-
"unsafe external function",
86-
"external functions are always unsafe; remove the `unsafe` \
87-
keyword"
88-
),
89-
ObsoleteTraitFuncVisibility => (
90-
"visibility not necessary",
91-
"trait functions inherit the visibility of the trait itself"
92-
),
93-
ObsoleteConstPointer => (
94-
"const pointer",
95-
"instead of `&const Foo` or `@const Foo`, write `&Foo` or \
96-
`@Foo`"
97-
),
98-
ObsoleteLoopAsContinue => (
99-
"`loop` instead of `continue`",
100-
"`loop` is now only used for loops and `continue` is used for \
101-
skipping iterations"
102-
),
103-
ObsoleteEnumWildcard => (
104-
"enum wildcard",
105-
"use `..` instead of `*` for matching all enum fields"
106-
),
107-
ObsoleteStructWildcard => (
108-
"struct wildcard",
109-
"use `..` instead of `_` for matching trailing struct fields"
110-
),
111-
ObsoleteVecDotDotWildcard => (
112-
"vec slice wildcard",
113-
"use `..` instead of `.._` for matching slices"
114-
),
115-
ObsoleteMultipleImport => (
116-
"multiple imports",
117-
"only one import is allowed per `use` statement"
118-
),
119-
ObsoleteManagedPattern => (
120-
"managed pointer pattern",
121-
"use a nested `match` expression instead of a managed box \
122-
pattern"
123-
),
124-
ObsoleteManagedString => (
125-
"managed string",
126-
"use `Rc<StrBuf>` instead of a managed string"
127-
),
128-
ObsoleteManagedVec => (
129-
"managed vector",
130-
"use `Rc<~[T]>` instead of a managed vector"
131-
),
13252
ObsoleteOwnedType => (
13353
"`~` notation for owned pointers",
13454
"use `Box<T>` in `std::owned` instead"

0 commit comments

Comments
 (0)