mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
move enum variant to the new API
This commit is contained in:
parent
11dda8a0fb
commit
4c514a3e02
6 changed files with 97 additions and 142 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue