about summary refs log tree commit diff
path: root/src/tools/rust-analyzer
AgeCommit message (Collapse)AuthorLines
2024-08-05Simplify FileDelegateLukas Wirth-86/+78
2024-08-05Auto merge of #17795 - Veykril:library-dep-loading, r=Veykrilbors-212/+156
feat: Load sysroot library via cargo metadata See https://github.com/rust-lang/rust/pull/128534, fixes https://github.com/rust-lang/rust-analyzer/issues/7637 Requires a toolchain from 176e54520 2024-08-04 or later to work.
2024-08-05feat: Load sysroot library via cargo metadataLukas Wirth-212/+156
2024-08-05add msvc note to manualJoel Daniel Rico-0/+6
2024-08-05fix: Insert a generic arg for `impl Trait` when lowering generic argsShoyu Vanilla-0/+24
2024-08-04test: add test case for inlay hint support for expr with labelYoung-Flash-0/+13
2024-08-02Wait with change processing until the vfs is doneLukas Wirth-30/+34
2024-08-02internal: Load VFS config changes in parallelLukas Wirth-81/+129
2024-08-02internal: Remove AbsPathBuf::TryFrom impl that checks too many things at onceLukas Wirth-95/+90
2024-08-02Auto merge of #17705 - huntc:resolve-ra, r=Veykrilbors-16/+191
feat: Use oldest rustup rust-analyzer when toolchain override is present Selects a rust-toolchain declared RA based on its date. The earliest (oldest) RA wins and becomes the one that the workspace uses as a whole. In terms of precedence: nightly > stable-with-version > stable With stable-with-version, we invoke the RA with a `--version` arg and attempt to extract a date. Given the same date as a nightly, the nightly RA will win. Fixes #17663
2024-08-02Make toggle_macro_delimiters work only for macro_callsAli Bektas-62/+112
2024-08-01feat: support inlay hint for more expr with labelYoung-Flash-3/+24
2024-08-01fix: Insert a tail `Ok(())` for expr block instead of wrapping with `Ok`Shoyu Vanilla-2/+68
2024-08-01when josh-proxy screws up the roundtrip, say what the involved commits areRalf Jung-1/+4
2024-08-01Add new assist toggle_macro_delimiterAli Bektas-0/+229
2024-07-31docs: Fix JSON example for rust-analyzer.workspace.discoverConfigWilfred Hughes-9/+7
The user does not specify `{arg}` in their JSON, and be pedantic about commas in JSON sample.
2024-08-01Prevent redundant obigation push for assignee exprsShoyu Vanilla-4/+8
2024-08-01fix: Apply `IndexMut` obligations for non-assigning mutable index usages, tooShoyu Vanilla-3/+71
2024-07-31Auto merge of #17750 - ↵bors-8/+6
davidbarsky:david/remove-abspath-requirement-in-linked-projects, r=Veykril fix: remove AbsPath requirement from linkedProjects Should (fingers crossed!) fix https://github.com/rust-lang/rust-analyzer/issues/17664. I opened the `rustc` workspace with the [suggested configuration](https://github.com/rust-lang/rust/blob/e552c168c72c95dc28950a9aae8ed7030199aa0d/src/etc/rust_analyzer_settings.json) and I was able to successfully open some rustc crates (`rustc_incremental`) and have IDE functionality. `@Veykril:` can you try these changes and let me know if it fixed rustc?
2024-07-31fix: remove AbsPath requirement from linkedProjectsDavid Barsky-8/+6
2024-07-31Corrected precedence positionhuntc-4/+4
2024-07-31Add a test caseShoyu Vanilla-0/+2
2024-07-31fix: Errors on method call inferences with elided lifetimesShoyu Vanilla-24/+72
2024-07-30Auto merge of #17744 - alibektas:debug_env_not_set, r=Veykrilbors-1/+1
minor: Set tracing level to debug when `cargo config get env` fails fixes #17739
2024-07-30Set tracing level to debug when `cargo config get env` failsAli Bektas-1/+1
2024-07-30Formattinghuntc-6/+6
2024-07-30Outdated comment removedhuntc-7/+6
2024-07-30Auto merge of #17735 - alibektas:ratoml_workspaces, r=Veykrilbors-276/+337
feat: Introduce workspace `rust-analyzer.toml`s In order to globally configure a project it was, prior to this PR, possible to have a `ratoml` at the root path of a project. This is not the case anymore. Instead we now let ratoml files that are placed at the root of any workspace have a new scope called `workspace`. Although there is not a difference between a `workspace` scope and and a `global` scope, future PRs will change that.
2024-07-30Further simplificationshuntc-16/+10
2024-07-30Auto merge of #17742 - Veykril:wrong-retries, r=Veykrilbors-4/+3
fix: Fix incorrect retrying of inlay hint requests
2024-07-30Checks date for any RAhuntc-20/+22
2024-07-30fix: Fix incorrect retrying of inlay hint requestsLukas Wirth-4/+3
2024-07-30Auto merge of #17741 - Veykril:include-raw, r=Veykrilbors-2/+14
fix: Fix builtin includes rejecting raw string literals Fixes https://github.com/rust-lang/rust-analyzer/issues/17701
2024-07-30fix: Fix builtin includes rejecting raw string literalsLukas Wirth-2/+14
2024-07-29Remove clippy errorsAli Bektas-8/+5
2024-07-29Auto merge of #17707 - Veykril:proc-macro-err-cleanup, r=Veykrilbors-826/+771
feat: Use spans for builtin and declarative macro expansion errors This should generally improve some error reporting for macro expansion errors. Especially for `compile_error!` within proc-macros
2024-07-29Add missing doc stringLukas Wirth-0/+1
2024-07-29Fix error spans for include! and compile_error!Lukas Wirth-29/+56
2024-07-29Auto merge of #17736 - hyf0:hyf_09234908234, r=Veykrilbors-5/+13
feat(ide-completion): explictly show `async` keyword on `impl trait` methods OLD: <img width="676" alt="image" src="https://github.com/user-attachments/assets/f6fa626f-6b6d-4c22-af27-b0755e7a6bf8"> Now: <img width="684" alt="image" src="https://github.com/user-attachments/assets/efbaac0e-c805-4dd2-859d-3e44b2886dbb"> --- This is an preparation for https://github.com/rust-lang/rust-analyzer/issues/17719. ```rust use std::future::Future; trait DesugaredAsyncTrait { fn foo(&self) -> impl Future<Output = usize> + Send; fn bar(&self) -> impl Future<Output = usize> + Send; } struct Foo; impl DesugaredAsyncTrait for Foo { fn foo(&self) -> impl Future<Output = usize> + Send { async { 1 } } // async fn bar(&self) -> usize { 1 } } fn main() { let fut = Foo.bar(); fn _assert_send<T: Send>(_: T) {} _assert_send(fut); } ``` If we don't distinguish `async` or not. It would be confusing to generate sugared version `async fn foo ....` and original form `fn foo` for `async fn in trait` that is defined in desugar form.
2024-07-29Make basic use of spans for macro expansion errorsLukas Wirth-328/+387
2024-07-29Add test in `ide-completion/src/tests/item_list.rs`Yunfei-1/+3
2024-07-29Revert "Fix error message"Yunfei-5/+1
This reverts commit 752c49b679afcec7edf5d26d52bf3d164ee7349f.
2024-07-29Auto merge of #17715 - Throne3d:fix/glob-may-override-vis-2, r=Veykrilbors-32/+197
fix: let glob imports override other globs' visibility Follow up to #14930 Fixes #11858 Fixes #14902 Fixes #17704 I haven't reworked the code here at all - I don't feel confident in the codebase to do so - just rebased it onto the current main branch and fixed conflicts. I'm not _entirely_ sure I understand the structure of the `check` function in `crates/hir-def/src/nameres` tests. I think the change to the test expectation from #14930 is correct, marking the `crate::reexport::inner` imports with `i`, and I understand it to mean there's a specific token in the import that we can match it to (in this case, `Trait`, `function` and `makro` of `pub use crate::defs::{Trait, function, makro};` respectively), but I had some trouble understanding the meaning of the different parts of `PerNs` to be sure. Does this make sense? I tested building and using RA locally with `cargo xtask install` and after this change the documentation for `arrow_array::ArrowPrimitiveType` seems to be picked up correctly!
2024-07-29Auto merge of #17722 - joshka:jm/logs, r=Veykrilbors-44/+46
feat: use vscode log format for client logs This change updates the log format to use the vscode log format instead of the custom log format, by replacing the `OutputChannel` with a `LogOutputChannel` and using the `debug`, `info`, `warn`, and `error` methods on it. This has the following benefits: - Each log level now has its own color and the timestamp is in a more standard format - Inspect output (e.g. the log of the config object) is now colored - Error stack traces are now shown in the output - The log level is now controlled on the output tab by clicking the gear icon and selecting "Debug" or by passing the `--log` parameter to vscode. The `trace.extension` setting has been marked as deprecated. Motivation: The large uncolored unformatted log output with a large config object logged whenever it changes has always dominated the logs. This subjectively has made it that looking to see what the client is doing has always been a bit disappointing. That said, there's only 17 log messages total in the client. Hopefully by making the logs more visually useful this will encourage adding more appropriate debug level messages in future. Incidentally, it might be worth only logging the config change message at a debug level instead of an info level to reduce the noise.
2024-07-29Cargo fmtYunfei-4/+8
2024-07-29Fix error messageYunfei-1/+5
2024-07-29feat(ide-completion): explictly show `async` keyword on `impl trait`Yunfei-2/+4
2024-07-29Remove unnec copying of source_root_idsAli Bektas-4/+4
2024-07-29add skip_slow_tests to ratoml testsAli Bektas-0/+61
2024-07-29Combine krate_ratoml and workspace_ratomls into oneAli Bektas-162/+163