mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Add SelfParam to code_model
This commit is contained in:
parent
a3b0a3aeb8
commit
b9b4693ce3
9 changed files with 62 additions and 43 deletions
|
@ -165,7 +165,7 @@ impl Resolver<'_, '_> {
|
|||
fn ok_to_use_path_resolution(&self, resolution: &hir::PathResolution) -> bool {
|
||||
match resolution {
|
||||
hir::PathResolution::AssocItem(hir::AssocItem::Function(function)) => {
|
||||
if function.has_self_param(self.resolution_scope.scope.db) {
|
||||
if function.self_param(self.resolution_scope.scope.db).is_some() {
|
||||
// If we don't use this path resolution, then we won't be able to match method
|
||||
// calls. e.g. `Foo::bar($s)` should match `x.bar()`.
|
||||
true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue