about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-01-15 10:17:01 +0000
committerGitHub <noreply@github.com>2022-01-15 10:17:01 +0000
commit9ee5b89e52bbd741ccdfa109f129716a1c272705 (patch)
treea60da960d645f58705553a93abe03881953d7601
parent844c152fd1be8f0142343a095d5b45586189f435 (diff)
parent2c36102722e2764f3cb1bf1ed610c8f6aed186ca (diff)
downloadrust-9ee5b89e52bbd741ccdfa109f129716a1c272705.tar.gz
rust-9ee5b89e52bbd741ccdfa109f129716a1c272705.zip
Merge #11292
11292: internal: Decrease PartialOrd and PartialEq trait methods completion relevance r=Veykril a=Veykril


Fixes https://github.com/rust-analyzer/rust-analyzer/issues/10245
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
-rw-r--r--crates/ide_completion/src/context.rs3
-rw-r--r--crates/ide_completion/src/item.rs2
2 files changed, 3 insertions, 2 deletions
diff --git a/crates/ide_completion/src/context.rs b/crates/ide_completion/src/context.rs
index 0baca08ca99..9eec4fd0c96 100644
--- a/crates/ide_completion/src/context.rs
+++ b/crates/ide_completion/src/context.rs
@@ -940,6 +940,7 @@ const OP_TRAIT_LANG_NAMES: &[&str] = &[
     "deref",
     "div_assign",
     "div",
+    "eq",
     "fn_mut",
     "fn_once",
     "fn",
@@ -949,6 +950,7 @@ const OP_TRAIT_LANG_NAMES: &[&str] = &[
     "mul",
     "neg",
     "not",
+    "partial_ord",
     "rem_assign",
     "rem",
     "shl_assign",
@@ -956,7 +958,6 @@ const OP_TRAIT_LANG_NAMES: &[&str] = &[
     "shr_assign",
     "shr",
     "sub",
-    "sub",
 ];
 #[cfg(test)]
 mod tests {
diff --git a/crates/ide_completion/src/item.rs b/crates/ide_completion/src/item.rs
index 8ac4291078a..b2a0b04b4f0 100644
--- a/crates/ide_completion/src/item.rs
+++ b/crates/ide_completion/src/item.rs
@@ -139,7 +139,7 @@ pub struct CompletionRelevance {
     /// }
     /// ```
     pub is_local: bool,
-    /// Set for method completions of the `core::ops` family.
+    /// Set for method completions of the `core::ops` and `core::cmp` family.
     pub is_op_method: bool,
     /// This is set in cases like these:
     ///