This commit is contained in:
Jakub Žádník 2021-10-04 22:37:43 +03:00
parent 1e1e12b027
commit 6f5f1fa43a

View File

@ -611,8 +611,7 @@ pub fn parse_hide(
.iter() .iter()
.map(|(name, _)| name.clone()) .map(|(name, _)| name.clone())
.collect() .collect()
} else { } else if import_pattern.members.is_empty() {
if import_pattern.members.is_empty() {
// The pattern head can be e.g. a function name, not just a module // The pattern head can be e.g. a function name, not just a module
vec![import_pattern.head.clone()] vec![import_pattern.head.clone()]
} else { } else {
@ -620,7 +619,6 @@ pub fn parse_hide(
garbage_statement(spans), garbage_statement(spans),
Some(ParseError::ModuleNotFound(spans[1])), Some(ParseError::ModuleNotFound(spans[1])),
); );
}
}; };
// This kind of inverts the import pattern matching found in parse_use() // This kind of inverts the import pattern matching found in parse_use()