Skip to content

Use slice patterns in rustc #61542

Closed
Closed
@oli-obk

Description

@oli-obk

After #61541 is merged, we should have a look at

let code = match (token_tree.len(), token_tree.get(0)) {
and replace all such workaround matches like that with matches that use slice patterns.

More examples in https://github.com/rust-lang/rust/blob/master/src/libsyntax/parse/mod.rs

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-cleanupCategory: PRs that clean code up or issues documenting cleanup.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions