mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
fix: Do not complete Drop::drop
, complete std::mem::drop
instead
This commit is contained in:
parent
276687a6ee
commit
5360c9bd22
8 changed files with 88 additions and 10 deletions
|
@ -5,6 +5,7 @@ use hir::{Local, Name, ScopeDef, Semantics, SemanticsScope, Type, TypeInfo};
|
|||
use ide_db::{
|
||||
active_parameter::ActiveParameter,
|
||||
base_db::{FilePosition, SourceDatabase},
|
||||
helpers::FamousDefs,
|
||||
RootDatabase,
|
||||
};
|
||||
use syntax::{
|
||||
|
@ -150,6 +151,10 @@ impl<'a> CompletionContext<'a> {
|
|||
self.previous_token.as_ref().map_or(false, |tok| tok.kind() == kind)
|
||||
}
|
||||
|
||||
pub(crate) fn famous_defs(&self) -> FamousDefs {
|
||||
FamousDefs(&self.sema, self.krate)
|
||||
}
|
||||
|
||||
pub(crate) fn dot_receiver(&self) -> Option<&ast::Expr> {
|
||||
match &self.completion_location {
|
||||
Some(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue