File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -880,11 +880,11 @@ impl<'a> Parser<'a> {
880
880
false
881
881
}
882
882
}
883
-
883
+
884
884
/// Expect and consume a `+`. if `+=` is seen, replace it with a `=`
885
885
/// and continue. If a `+` is not seen, return false.
886
886
///
887
- /// This is using when token splitting += into +.
887
+ /// This is using when token splitting += into +.
888
888
/// See issue 47856 for an example of when this may occur.
889
889
fn eat_plus ( & mut self ) -> bool {
890
890
self . expected_tokens . push ( TokenType :: Token ( token:: BinOp ( token:: Plus ) ) ) ;
@@ -901,8 +901,8 @@ impl<'a> Parser<'a> {
901
901
_ => false ,
902
902
}
903
903
}
904
-
905
-
904
+
905
+
906
906
/// Checks to see if the next token is either `+` or `+=`.
907
907
/// Otherwise returns false.
908
908
fn check_plus ( & mut self ) -> bool {
@@ -1679,7 +1679,7 @@ impl<'a> Parser<'a> {
1679
1679
let poly_trait_ref = PolyTraitRef :: new ( generic_params, path, lo. to ( self . prev_span ) ) ;
1680
1680
let mut bounds = vec ! [ TraitTyParamBound ( poly_trait_ref, TraitBoundModifier :: None ) ] ;
1681
1681
if parse_plus {
1682
- self . eat_plus ( ) ; // `+` or `+=` gets split and `+` is discarded
1682
+ self . eat_plus ( ) ; // `+`, or `+=` gets split and `+` is discarded
1683
1683
bounds. append ( & mut self . parse_ty_param_bounds ( ) ?) ;
1684
1684
}
1685
1685
Ok ( TyKind :: TraitObject ( bounds, TraitObjectSyntax :: None ) )
Original file line number Diff line number Diff line change @@ -224,7 +224,7 @@ impl Token {
224
224
_ => false ,
225
225
}
226
226
}
227
-
227
+
228
228
pub fn is_like_plus ( & self ) -> bool {
229
229
match * self {
230
230
BinOp ( Plus ) | BinOpEq ( Plus ) => true ,
You can’t perform that action at this time.
0 commit comments