Skip to content

Commit 94dc829

Browse files
committed
---
yaml --- r: 50677 b: refs/heads/try c: 2ccc6e0 h: refs/heads/master i: 50675: b97068e v: v3
1 parent 6a48715 commit 94dc829

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
@@ -2,7 +2,7 @@
22
refs/heads/master: 5f13e9ccc2e3328d4cd8ca49f84e6840dd998346
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: f7a2371c176663d59062ec5158f39faecba45768
5-
refs/heads/try: ac60d53c65fe499660ea6b508200283bb3cdb19d
5+
refs/heads/try: 2ccc6e0a57660aaf84c70208bb98c5eb4285de3a
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/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)