Parser: Global single-segment paths should be represented as PatEnum
Fixed #15774.
This commit is contained in:
parent
826b835813
commit
ad30579ef8
2 changed files with 33 additions and 1 deletions
|
@ -3101,7 +3101,7 @@ impl<'a> Parser<'a> {
|
|||
}
|
||||
},
|
||||
_ => {
|
||||
if enum_path.segments.len() == 1 {
|
||||
if !enum_path.global && enum_path.segments.len() == 1 {
|
||||
// it could still be either an enum
|
||||
// or an identifier pattern, resolve
|
||||
// will sort it out:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue