Fix a pattern desugaring bug

This commit is contained in:
Shunsuke Shibayama 2022-12-19 22:44:54 +09:00
parent 6e839d6f03
commit 24b8f3f63d
2 changed files with 24 additions and 6 deletions

View file

@ -76,7 +76,7 @@ impl Context {
ast::VarPattern::Discard(_) => {
return Ok(());
}
_ => todo!(),
other => unreachable!("{other}"),
};
let vis = ident.vis();
let kind = id.map_or(VarKind::Declared, VarKind::Defined);