1
Fork 0

Parser: Global single-segment paths should be represented as PatEnum

Fixed #15774.
This commit is contained in:
Jakub Wieczorek 2014-07-21 18:47:24 +02:00
parent 826b835813
commit ad30579ef8
2 changed files with 33 additions and 1 deletions

View file

@ -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: