mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-03 17:48:43 +00:00
rustc_parse: A few cleanups to expression parsing next to attributes - The `_with` suffix is removed from `parse_expr_assoc_with` and `parse_expr_assoc_rest_with`. There's no version with `with`, the precedence is always specified. - `parse_expr_res` and `parse_expr_assoc` are split into two versions taking pre-parsed attributes and not taking pre-parsed attributes. The latter versions are more common and can have simpler return type. - "Dead" `parse_outer_attributes` is removed from `parse_expr_prefix_range`, it can never parse anything because the current token is a range separator. - `bump` is moved out of `parse_expr_prefix_common`, it allows reusing `parse_expr_prefix_common` in one more place. - A test covering some previously uncovered attribute parsing cases is added.