mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Make the Resolution variants tuple variants
This commit is contained in:
parent
d3df80dfe4
commit
d571d26955
7 changed files with 41 additions and 53 deletions
|
@ -12,7 +12,7 @@ pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) {
|
|||
_ => return,
|
||||
};
|
||||
let def = match ctx.resolver.resolve_path(ctx.db, &path).take_types() {
|
||||
Some(Resolution::Def { def }) => def,
|
||||
Some(Resolution::Def(def)) => def,
|
||||
_ => return,
|
||||
};
|
||||
match def {
|
||||
|
@ -24,7 +24,7 @@ pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) {
|
|||
ctx.source_range(),
|
||||
name.to_string(),
|
||||
)
|
||||
.from_resolution(ctx, &res.def.map(|def| hir::Resolution::Def { def }))
|
||||
.from_resolution(ctx, &res.def.map(hir::Resolution::Def))
|
||||
.add_to(acc);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue