rust/crates
bors 3c4d642d8b Auto merge of #16117 - mustakimali:mo-order, r=Veykril
feat: completion list suggests constructor like & builder methods first

When typing `MyType::` the completion items' order could be re-ordered based on how likely we want to select those:
* Constructors: `new` like functions to be able to create the type,
* Constructors that take args: Any other function that creates `Self`,
* Builder Methods: any builder methods available,
* Regular methods & associated functions (no change there)

![image](https://github.com/rust-lang/rust-analyzer/assets/1546896/54593b91-07b3-455a-8a71-8d203d4eaf4a)

In this photo, the order is:
* `new` constructor is first
* `new_builder` second is a builder method
* `aaaanew` is a constructor that takes arguments, is third  and is irrespective of its alphabetical order among names.

---

Another Example using actix `HttpServer` shows preferring constructor without `self` arg first (the `new` method)

![image](https://github.com/rust-lang/rust-analyzer/assets/1546896/938d3fb0-3d7a-4427-ae2f-ec02a834ccbe)

![image](https://github.com/rust-lang/rust-analyzer/assets/1546896/2c13860c-efd1-459d-b25e-df8adb61bbd0)

I've dropped my previous idea of highlighting these functions in the rustdoc (https://github.com/rust-lang/rust/pull/107926)
2024-02-13 12:06:25 +00:00
..
base-db feat: ignored and disabled macro expansion 2024-02-12 12:50:40 +01:00
cfg
flycheck flycheck: initial implementation of $saved_file 2024-02-12 15:45:48 +01:00
hir Cleanup term search related changes 2024-02-11 14:35:54 +02:00
hir-def Auto merge of #16540 - Veykril:macro-arg, r=Veykril 2024-02-12 16:32:40 +00:00
hir-expand internal: macro_arg query always returns a TokenTree 2024-02-12 17:19:41 +01:00
hir-ty Auto merge of #16092 - kilpkonn:term_search_1, r=Veykril 2024-02-12 14:47:12 +00:00
ide remove eprintln! overwrite 2024-02-12 23:54:32 -05:00
ide-assists remove eprintln! overwrite 2024-02-12 23:54:32 -05:00
ide-completion fix: clippy 2024-02-13 10:11:17 +00:00
ide-db Cleanup term search related changes 2024-02-11 14:35:54 +02:00
ide-diagnostics Auto merge of #16540 - Veykril:macro-arg, r=Veykril 2024-02-12 16:32:40 +00:00
ide-ssr ide-ssr: Fix warnings about clippy str_to_string rule 2024-02-10 01:00:40 +09:00
intern
limit
load-cargo Encode disabled proc-macros via boolean flag, not special Expander 2024-02-12 13:39:38 +01:00
mbe fix: Fix macro transcriber emitting incorrect lifetime tokens 2024-02-11 12:10:38 +01:00
parser parser: Fix warnings about clippy str_to_string rule 2024-02-10 01:00:40 +09:00
paths
proc-macro-api proc-macro-api: Fix warnings about clippy str_to_string rule 2024-02-10 01:00:40 +09:00
proc-macro-srv fix: Validate literals in proc-macro-srv FreeFunctions::literal_from_str 2024-02-13 12:33:51 +01:00
proc-macro-srv-cli
profile
project-model fix: Fix target layout fetching 2024-02-12 21:29:52 +01:00
rust-analyzer Auto merge of #15476 - Wilfred:implement-saved-file3, r=Veykril 2024-02-12 14:59:37 +00:00
salsa internal: Remove SELF_REF hack for self referential SyntaxContexts 2024-02-10 16:20:02 +01:00
sourcegen sourcegen: Fix warnings about clippy str_to_string rule 2024-02-10 01:00:40 +09:00
span internal: Remove SELF_REF hack for self referential SyntaxContexts 2024-02-10 16:20:02 +01:00
stdx
syntax fix: Validate literals in proc-macro-srv FreeFunctions::literal_from_str 2024-02-13 12:33:51 +01:00
test-fixture Encode disabled proc-macros via boolean flag, not special Expander 2024-02-12 13:39:38 +01:00
test-utils Cleanup term search related changes 2024-02-11 14:35:54 +02:00
text-edit text-edit: Fix warnings about clippy str_to_string rule 2024-02-10 01:00:41 +09:00
toolchain internal: tool discovery prefers sysroot tools 2024-02-12 12:08:18 +01:00
tt fix: Fix macro transcriber emitting incorrect lifetime tokens 2024-02-11 12:10:38 +01:00
vfs vfs: Fix warnings about clippy str_to_string rule 2024-02-10 01:00:40 +09:00
vfs-notify