about summary refs log tree commit diff
path: root/src/tools/rust-analyzer/crates/ide-db
AgeCommit message (Collapse)AuthorLines
2024-07-15Auto merge of #17587 - joshka:jm/edit-name-after-refactor, r=Veykrilbors-5/+21
Trigger VSCode to rename after extract variable assist is applied When the user applies the "Extract Variable" assist, the cursor is positioned at the newly inserted variable. This commit adds a command to the assist that triggers the rename action in VSCode. This way, the user can quickly rename the variable after applying the assist. Fixes part of: #17579 https://github.com/user-attachments/assets/4cf38740-ab22-4b94-b0f1-eddd51c26c29 I haven't yet looked at the module or function extraction assists yet.
2024-07-15Fix stable iteration ordering for `Map<Name, ...>` usagesLukas Wirth-5/+5
2024-07-12Trigger VSCode to rename after extract variable assist is appliedbors-5/+21
When the user applies the "Extract Variable" assist, the cursor is positioned at the newly inserted variable. This commit adds a command to the assist that triggers the rename action in VSCode. This way, the user can quickly rename the variable after applying the assist. Fixes part of: #17579
2024-07-12Use Symbol in NameLukas Wirth-5/+5
2024-07-11Merge from rust-lang/rustLaurențiu Nicola-1/+0
2024-07-07Auto merge of #17555 - Veykril:grammar-inline, r=Veykrilbors-1/+1
internal: Inline generated syntax methods
2024-07-07HasGenericArgs syntax traitLukas Wirth-1/+1
2024-07-07Auto merge of #17523 - wada314:master, r=Veykrilbors-4/+35
Add an option to use "::" for the external crate prefix. Fixes #11823 . Hi I'm very new to rust-analyzer and not sure how the review process are. Can somebody take a look at this PR? thanks!
2024-07-07Update generated lint definitionsLukas Wirth-796/+1022
2024-07-02squash.Shohei Wada-4/+35
2024-07-01Auto merge of #17494 - harrysarson:harry/keep-braces, r=Veykrilbors-3/+30
do not normalize `use foo::{self}` to `use foo` It changes behaviour and can cause collisions. E.g. for the following snippet ```rs mod foo { pub mod bar {} pub const bar: i32 = 8; } // transforming the below to `use foo::bar;` causes the error: // // the name `bar` is defined multiple times use foo::bar::{self}; const bar: u32 = 99; fn main() { let local_bar = bar; } ``` we still normalize ```rs use foo::bar; use foo::bar::{self}; ``` to `use foo::bar;` because this cannot cause collisions. See: https://github.com/rust-lang/rust-analyzer/pull/17140#issuecomment-2079189725
2024-06-30Remove inline `rust_2018_idioms, unused_lifetimes` lint warn, Cargo.toml ↵Lukas Wirth-2/+0
already enforces this
2024-06-30SimplifyLukas Wirth-5/+1
2024-06-27Remove the `box_pointers` lint.Nicholas Nethercote-1/+0
As the comment says, this lint "is mostly historical, and not particularly useful". It's not worth keeping it around.
2024-06-26do not normalize `use foo::{self}` to `use foo`Harry Sarson-3/+30
It changes behaviour and can cause collisions. E.g. for the following snippet ```rs mod foo { pub mod bar {} pub const bar: i32 = 8; } // tranforming the below to `use foo::bar;` causes the error: // // the name `bar` is defined multiple times use foo::bar::{self}; const bar: u32 = 99; fn main() { let local_bar = bar; } ``` we still normalize ```rs use foo::bar; use foo::bar::{self}; ``` to `use foo::bar;` because this cannot cause collisions. See: https://github.com/rust-lang/rust-analyzer/pull/17140#issuecomment-2079189725
2024-06-24Enum variants are not generic def idsLukas Wirth-4/+7
2024-06-17Auto merge of #17439 - Veykril:paralleler-prime-caches, r=Veykrilbors-34/+16
Properly prime all crate def maps in parallel_prime_caches
2024-06-17Properly prime all crate def maps in `parallel_prime_caches`Lukas Wirth-34/+16
2024-06-13internal: Fix rustdoc warningsWilfred Hughes-1/+1
`cargo doc` generates a bunch of warnings on rust-analyzer. Fix all the bare URL and empty code block warnings.
2024-06-11Auto merge of #17374 - Veykril:configs, r=Veykrilbors-1/+1
Allow choosing logical cores for num threads config
2024-06-10Thread more HasSource::source calls through Semantics for cachingLukas Wirth-11/+11
2024-06-09Allow choosing logical cores for num threads configLukas Wirth-1/+1
2024-06-06chore: Prefer tracing span shorthand macrosWilfred Hughes-31/+25
2024-06-04Auto merge of #17282 - jkelleyrtp:jk/filter-by-underscorte, r=Veykrilbors-1/+7
Feat: hide double underscored symbols from symbol search Fixes #17272 by changing the default behavior of query to skip results that start with `__` (two underscores). Not sure if this has any far reaching implications - a review would help to understand if this is the right place to do the filtering, and if it's fine to do it by default on the query. If you type `__` as your search, then we'll show the matching double unders, just in case you actually need the symbol.
2024-06-04Recognize `__` prefixes for symbol search queryLukas Wirth-12/+3
2024-06-03SimplifyLukas Wirth-1/+1
2024-06-02Make `extract_expressions_from_format_string` only use snippets when availableDropDemBits-0/+6
2024-05-24Add toggle_async_sugar assist code actionmaxwase-0/+4
2024-05-22Fix: clippyJonathan Kelley-1/+1
2024-05-22Allow searching with prefixJonathan Kelley-1/+6
2024-05-22Feat: hide double underscored symbols from symbol searchJonathan Kelley-1/+11
2024-05-22fix: ensure implied bounds from associated types are considered in autocompleteDavid Barsky-1/+10
2024-05-22internal: refactor `prefer_no_std`/`prefer_prelude` bools into a structDavid Barsky-33/+20
2024-05-22Auto merge of #17277 - Veykril:find-path-fixes, r=Veykrilbors-5/+5
fix: Various find path fixes Fixes https://github.com/rust-lang/rust-analyzer/issues/17271
2024-05-22Auto merge of #17268 - Veykril:signatures, r=Veykrilbors-11/+9
feat: More callable info With this PR we retain more info about callables other than functions, allowing for closure parameter type inlay hints to be linkable as well as better signature help around closures and `Fn*` implementors.
2024-05-22Update assists test fixturesLukas Wirth-7/+11
2024-05-22fix: Fix general find-path inconsistenciesLukas Wirth-14/+10
2024-05-19Merge from rust-lang/rustLaurențiu Nicola-3/+3
2024-05-18Show fn traits in signature info for trait implementorsLukas Wirth-4/+1
2024-05-18Allow hir::Param to refer to other entity params aside from functionsLukas Wirth-7/+8
2024-05-16Auto merge of #17243 - Veykril:static-lt-hir, r=Veykrilbors-8/+18
internal: Add StaticLifetime to hir API
2024-05-16internal: Add StaticLifetime to hir APILukas Wirth-8/+18
2024-05-15Fix typosblyxyas-1/+1
2024-04-30fix: Tracing span names should match function namesWilfred Hughes-11/+9
When viewing traces, it's slightly confusing when the span name doesn't match the function name. Ensure the names are consistent. (It might be worth moving most of these to use #[tracing::instrument] so the name can never go stale. @davidbarsky suggested that is marginally slower, so I've just done the simple change here.)
2024-04-25fix: Fix expression scopes not being calculated for inline constsLukas Wirth-2/+2
2024-04-24Error on using `yield` without also using `#[coroutine]` on the closureOli Scherer-3/+3
And suggest adding the `#[coroutine]` to the closure
2024-04-21Allow rust files to be used linkedProjectsLukas Wirth-0/+26617
2024-04-20Merge commit '55d9a533b309119c8acd13061581b43ae8840823' into sync-from-raLaurențiu Nicola-105/+136
2024-03-31Merge commit 'f5a9250147f6569d8d89334dc9cca79c0322729f' into sync-from-raLaurențiu Nicola-0/+1
2024-03-17Merge commit '5ecace48f693afaa6adf8cb23086b651db3aec96' into sync-from-raLaurențiu Nicola-19/+20