Track labels in scopes

This commit is contained in:
Lukas Wirth 2021-03-21 00:59:45 +01:00
parent 090e013161
commit cbd325707b
4 changed files with 57 additions and 11 deletions

View file

@ -839,6 +839,10 @@ impl<'a> SemanticsScope<'a> {
let parent = resolver.body_owner().unwrap();
ScopeDef::Local(Local { parent, pat_id })
}
resolver::ScopeDef::Label(label_id) => {
let parent = resolver.body_owner().unwrap();
ScopeDef::Label(Label { parent, label_id })
}
};
f(name, def)
})