11210: feat: Deprioritize ops methods in completion r=Veykril a=Veykril

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/10593



Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
This commit is contained in:
bors[bot] 2022-01-11 09:39:12 +00:00 committed by GitHub
commit 5a711d4f3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 130 additions and 38 deletions

View file

@ -309,26 +309,6 @@ pub mod known {
wrapping_mul,
wrapping_sub,
// known methods of lang items
add,
mul,
sub,
div,
rem,
shl,
shr,
bitxor,
bitor,
bitand,
add_assign,
mul_assign,
sub_assign,
div_assign,
rem_assign,
shl_assign,
shr_assign,
bitxor_assign,
bitor_assign,
bitand_assign,
eq,
ne,
ge,
@ -336,12 +316,38 @@ pub mod known {
le,
lt,
// lang items
not,
neg,
add_assign,
add,
bitand_assign,
bitand,
bitor_assign,
bitor,
bitxor_assign,
bitxor,
deref_mut,
deref,
div_assign,
div,
fn_mut,
fn_once,
future_trait,
owned_box,
index,
partial_ord
index_mut,
mul_assign,
mul,
neg,
not,
owned_box,
partial_ord,
r#fn,
rem_assign,
rem,
shl_assign,
shl,
shr_assign,
shr,
sub_assign,
sub,
);
// self/Self cannot be used as an identifier