move enum variant to the new API

This commit is contained in:
Aleksey Kladov 2019-01-24 23:32:41 +03:00
parent 11dda8a0fb
commit 4c514a3e02
6 changed files with 97 additions and 142 deletions

View file

@ -143,11 +143,11 @@ impl Module {
.find(|(n, _variant)| n == &segment.name);
match matching_variant {
Some((_n, variant)) => PerNs::both(variant.def_id().into(), (*e).into()),
Some((_n, variant)) => PerNs::both(variant.into(), (*e).into()),
None => PerNs::none(),
}
}
ModuleDef::Function(_) | ModuleDef::Struct(_) => {
ModuleDef::Function(_) | ModuleDef::Struct(_) | ModuleDef::EnumVariant(_) => {
// could be an inherent method call in UFCS form
// (`Struct::method`), or some other kind of associated
// item... Which we currently don't handle (TODO)