mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-28 03:07:24 +03:00
404ee74367
remove unnecessary variables and delimiter check Zulip discussion: https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/question.20about.20lex_token_tree_open_delim.20in.20rustc_parse/with/580552157 In `lex_token_tree_open_delim`, after calling `self.lex_token_trees(/* is_delimited */ true)`: - If the delimiters are well-balanced, the value popped from the stack will always equal to `open_delim` and `pre_span`. - If the delimiters are not balanced, `self.lex_token_trees(/* is_delimited */ true)` will return an error so this branch will not be reached Therefore `open_delimiter` and `open_delimiter_span` can be removed. Test `tests/ui/parser` all passed