Skip to content

Commit 9498043

Browse files
committed
---
yaml --- r: 138990 b: refs/heads/try2 c: 2ccc6e0 h: refs/heads/master v: v3
1 parent 9e73866 commit 9498043

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
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: ac60d53c65fe499660ea6b508200283bb3cdb19d
8+
refs/heads/try2: 2ccc6e0a57660aaf84c70208bb98c5eb4285de3a
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/libsyntax/parse/parser.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -469,11 +469,11 @@ pub impl Parser {
469469
either::Left(p.parse_arg_general(false))
470470
};
471471
// XXX: Wrong. Shouldn't allow both static and self_ty
472-
let self_ty = if is_static { static_sty } else { self_ty };
473-
474-
if self_ty.node == sty_by_ref {
475-
self.obsolete(self_ty.span, ObsoleteImplicitSelf);
476-
}
472+
let self_ty = if is_static || self_ty.node == sty_by_ref {
473+
static_sty
474+
} else {
475+
self_ty
476+
};
477477
478478
let hi = p.last_span.hi;
479479
debug!("parse_trait_methods(): trait method signature ends in \
@@ -2983,11 +2983,11 @@ pub impl Parser {
29832983
p.parse_arg()
29842984
};
29852985
// XXX: interaction between staticness, self_ty is broken now
2986-
let self_ty = if is_static { static_sty} else { self_ty };
2987-
2988-
if self_ty.node == sty_by_ref {
2989-
self.obsolete(self_ty.span, ObsoleteImplicitSelf);
2990-
}
2986+
let self_ty = if is_static || self_ty.node == sty_by_ref {
2987+
static_sty
2988+
} else {
2989+
self_ty
2990+
};
29912991

29922992
let (inner_attrs, body) = self.parse_inner_attrs_and_block(true);
29932993
let hi = body.span.hi;

0 commit comments

Comments
 (0)