File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -469,11 +469,11 @@ pub impl Parser {
469
469
either::Left(p.parse_arg_general(false))
470
470
};
471
471
// 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
+ };
477
477
478
478
let hi = p.last_span.hi;
479
479
debug!(" parse_trait_methods( ) : trait method signature ends in \
@@ -2983,11 +2983,11 @@ pub impl Parser {
2983
2983
p. parse_arg ( )
2984
2984
} ;
2985
2985
// 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
+ } ;
2991
2991
2992
2992
let ( inner_attrs, body) = self . parse_inner_attrs_and_block ( true ) ;
2993
2993
let hi = body. span . hi ;
You can’t perform that action at this time.
0 commit comments