Skip to content

expected PatTop (macro-error) with open X.. ranges in macros #17441

@eduardosm

Description

@eduardosm

rust-analyzer version: 0.3.1995-standalone

rustc version: rustc 1.79.0 (129f3b996 2024-06-10)

editor or extension: VSCode v0.3.1995

code snippet to reproduce:

fn f(x: u32) -> bool {
    matches!(x, 0..)
}

The macro call will be marked with error "expected PatTop", but rustc will compile it fine.

Metadata

Metadata

Assignees

Labels

C-bugCategory: bug

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions