Empowering everyone to build reliable and efficient software.
Go to file
bors b03a0bda18 Auto merge of #15627 - jmintb:sort_imports, r=Veykril
feat: Prioritize import suggestions based on the expected type

Hi, this is a draft PR to solve #15384. `Adt` types work and now I have a few questions :)

1. What other types make sense in this context? Looking at [ModuleDef](05666441ba/crates/hir/src/lib.rs (L275)) I am thinking everything except Modules.
2. Is there an existing way of converting between `ModeuleDef` and `hir::Type` in the rustanalyzer code base?
3. Does this approach seem sound to you?

Ups: Upon writing this I just realised that the enum test is invalided as there are no enum variants and this no variant is passed as a function argument.
2023-12-08 12:39:23 +00:00
.cargo Less once_cell more std 2023-09-01 17:30:59 +02:00
.github Disable win32-ia32 VSIX builds 2023-11-15 11:07:31 +02:00
.vscode Spelling 2023-04-19 09:45:55 -04:00
assets Automatically change text color in logo based on dark mode 2022-03-06 23:06:53 +11:00
bench_data Spelling 2023-04-19 09:45:55 -04:00
crates Auto merge of #15627 - jmintb:sort_imports, r=Veykril 2023-12-08 12:39:23 +00:00
docs Merge commit 'e402c494b7c7d94a37c6d789a216187aaf9ccd3e' into sync-from-ra 2023-12-04 09:19:15 +02:00
editors/code Auto merge of #15896 - minestarks:run-quickpick, r=Veykril 2023-12-08 10:00:37 +00:00
lib fix: correct existing tests for WideChar in lib 'line-index' and add more tests 2023-12-07 15:33:28 +08:00
xtask Don't explicitly warn against semicolon_in_expressions_from_macros 2023-12-05 11:35:09 +01:00
.editorconfig Set .editorconfig default indent size to 4 2023-07-11 23:02:54 +09:00
.git-blame-ignore-revs add prettier format commit to ignored revisions 2022-05-17 18:15:51 +01:00
.gitattributes Fix .gitattributes for test_data 2022-07-24 14:05:35 +02:00
.gitignore internal: add "Shuffle Crate Graph" command 2021-12-07 16:37:19 +01:00
Cargo.lock Auto merge of #16043 - Veykril:dep-bump, r=Veykril 2023-12-07 10:52:52 +00:00
Cargo.toml Bump and unlock some dependencies 2023-12-07 11:48:58 +01:00
LICENSE-APACHE Licenses 2018-01-10 22:47:04 +03:00
LICENSE-MIT Licenses 2018-01-10 22:47:04 +03:00
PRIVACY.md Update privacy note 2021-12-23 14:04:15 +02:00
README.md Fix r-a spelling in some places 2022-08-01 13:47:09 +02:00
rust-bors.toml Prepare for rust-bors 2023-10-05 15:26:09 +03:00
rustfmt.toml Remove forcing \n via rustfmt 2019-11-02 22:19:59 +03:00
triagebot.toml triagebot exclude_labels -> exclude_titles 2023-09-16 10:58:53 -06:00

rust-analyzer logo

rust-analyzer is a modular compiler frontend for the Rust language. It is a part of a larger rls-2.0 effort to create excellent IDE support for Rust.

Quick Start

https://rust-analyzer.github.io/manual.html#installation

Documentation

If you want to contribute to rust-analyzer or are just curious about how things work under the hood, check the ./docs/dev folder.

If you want to use rust-analyzer's language server with your editor of choice, check the manual folder. It also contains some tips & tricks to help you be more productive when using rust-analyzer.

Security and Privacy

See the corresponding sections of the manual.

Communication

For usage and troubleshooting requests, please use "IDEs and Editors" category of the Rust forum:

https://users.rust-lang.org/c/ide/14

For questions about development and implementation, join rust-analyzer working group on Zulip:

https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer

License

rust-analyzer is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE and LICENSE-MIT for details.