David Barsky
c246a93046
completions: speed up completions by filtering non-applicable traits
2024-02-26 12:49:11 -05:00
Lukas Wirth
d93096ecc0
internal: Fetch toolchain and datalayout for DetachedFiles
2024-02-20 10:40:39 +01:00
Lukas Wirth
2ebf0c87c2
Deduplicate some code
2024-02-10 01:51:22 +01:00
Matthias Krüger
ac9d1a03a7
remove clones
2024-02-05 23:15:47 +01:00
bors
3e47532dd4
Auto merge of #16474 - davidbarsky:david/import-on-the-fly-improvements, r=lnicola
...
internal: even more `tracing`
As part of profiling completions, I added some additional spans and moved `TyBuilder::subst_for_def` closer to its usage site (the latter had a small impact on completion performance. Thanks for the tip, Lukas!)
2024-02-05 09:01:58 +00:00
David Barsky
f9bef39d48
internal: add some more tracing
spans inside of hir-ty
2024-02-01 16:10:32 -05:00
Johann Hemmann
df2c7a6e4e
cargo clippy --fix
2024-01-31 19:06:36 +01:00
David Barsky
e1ea7c8844
internal: switch to tracing
from log
...
This commit also adds `tracing` to NotificationDispatcher/RequestDispatcher,
bumps `rust-analyzer-salsa` to 0.17.0-pre.6, `always-assert` to 0.2, and
removes the homegrown `hprof` implementation in favor of a vendored
tracing-span-tree.
2024-01-30 12:27:31 -05:00
davidsemakula
dba3fc4425
style: remove unnecessary macro
2024-01-30 16:15:15 +03:00
davidsemakula
81d713ea9f
remove ordered insert logic from recursive merge function
2024-01-28 11:55:01 +03:00
davidsemakula
8fab92feb2
normalize use trees when merging imports
2024-01-28 11:55:01 +03:00
bors
85c9a83262
Auto merge of #16398 - Urhengulas:satisfy-clippy, r=Veykril
...
`cargo clippy --fix`
This PR is the result of running `cargo clippy --fix && cargo fmt` in the root of the repository. I did not manually review all the changes, but just skimmed through a few of them. The tests still pass, so it seems fine.
2024-01-19 09:43:35 +00:00
Johann Hemmann
fad4fa163c
cargo clippy --fix
2024-01-18 13:59:49 +01:00
davidsemakula
57d4b5bb0f
add "one" import granularity
2024-01-18 01:44:57 +03:00
davidsemakula
84a3b52a10
properly order raw idents when ordering use trees
2024-01-17 21:46:19 +03:00
davidsemakula
1f91c487a2
move is_upper_snake_case to stdx
2024-01-16 13:37:22 +03:00
davidsemakula
5b2a2bc3fb
remove unnecessary ref patterns
2024-01-16 13:26:49 +03:00
davidsemakula
d4b43d5a51
improve ordered use tree merging implementation
2024-01-14 19:49:50 +03:00
davidsemakula
db3f0f1761
improve use tree simple path comparison logic
2024-01-12 18:23:58 +03:00
davidsemakula
22ae5f49ba
order merged use trees
2024-01-12 17:05:23 +03:00
davidsemakula
4a6b16bfbe
order use trees following rustfmt's algorithm for ordering imports
2024-01-11 20:04:45 +03:00
davidsemakula
89d6b011c4
remove unnecessary ast::Path::segments alternatives
2024-01-06 12:53:56 +03:00
Lukas Wirth
cc2b79feeb
internal: Speed up import searching some more
2024-01-05 12:58:20 +01:00
Lukas Wirth
4f75e0f910
Remove completion limit for trait importing method completions
2024-01-05 12:03:08 +01:00
Lukas Wirth
2666349392
Remove limit from symbol_index::Query
2024-01-04 19:20:10 +01:00
Lukas Wirth
c3a29e5528
Remove limit from import_map::Query
2024-01-04 18:12:25 +01:00
Lukas Wirth
f49a2fed3f
internal: Move out WithFixture
into dev-dep only crate
2023-12-18 15:24:08 +01:00
Lukas Wirth
35620306a6
internal: Move proc-macro knowledge out of base-db
2023-12-18 12:37:18 +01:00
Lukas Wirth
34ec665ba1
Simplify and improve perf of import_assets::import_for_item
2023-12-12 11:35:34 +01:00
Lukas Wirth
18591ae5c8
Always render the path to be imported in the completion detail
2023-12-11 18:37:12 +01:00
Lukas Wirth
ba61766217
Add config for preferring / ignoring prelude modules in find_path
2023-11-11 14:56:38 +01:00
Young-Flash
a723acf346
simplify the code
2023-10-31 21:03:26 +08:00
Young-Flash
4f5f7e2800
feat: import trait with alias
2023-10-22 21:39:00 +08:00
Lukas Wirth
4af730eb26
Do flyimport completions by prefix search for short paths
2023-10-05 13:21:12 +02:00
dfireBird
df1239bf92
add tests for insert use with renamed imports
...
Tested for two cases:
1. Simple Use
2. Complex Use
2023-09-11 17:43:53 +05:30
dfireBird
d79486529e
remove as _
on auto importing on trait that is aliased with _
2023-09-11 17:43:53 +05:30
ponyii
e4c45427dc
refactoring
2023-08-08 21:57:55 +04:00
Ryo Yoshida
8cd4e9f7ec
Merge assoc_items_only
and exclude_import_kinds
into assoc_mode
2023-06-30 23:37:10 +09:00
Lukas Wirth
c7ef6c25b7
internal: Replace Display impl for Name
2023-05-24 20:55:12 +02:00
Lukas Wirth
9e5fa74279
Simplify
2023-02-27 15:51:45 +01:00
Daniel Eades
cc80c5bd07
remove unnecessary lazy evaluations
2023-01-02 15:02:54 +00:00
Yuri Astrakhan
e16c76e3c3
Inline all format arguments where possible
...
This makes code more readale and concise,
moving all format arguments like `format!("{}", foo)`
into the more compact `format!("{foo}")` form.
The change was automatically created with, so there are far less change
of an accidental typo.
```
cargo clippy --fix -- -A clippy::all -W clippy::uninlined_format_args
```
2022-12-24 14:36:10 -05:00
Petr Portnov
ed532e5a34
Fix duplicate usage of a
article.
...
This fixes a typo first appearing in #94624
in which test-macro diagnostic uses "a" article twice.
Since I searched sources for " a a " sequences,
I also fixed the same issue in a few source files where I found it.
Signed-off-by: Petr Portnov <gh@progrm-jarvis.ru>
2022-10-02 21:40:39 +03:00
Laurențiu Nicola
f5fde4df43
⬆️ rust-analyzer
2022-09-20 17:39:17 +03:00
Laurențiu Nicola
459bbb4222
⬆️ rust-analyzer
2022-09-13 15:38:11 +03:00
Amos Wenger
7e285e1ef5
Run cargo fmt
2022-07-20 15:06:15 +02:00
Amos Wenger
816f7fe12a
Run cargo fix --edition-idioms
2022-07-20 15:02:08 +02:00
Lukas Wirth
6b823b0234
fix: Fix imports being inserted before doc comments in inline modules
2022-07-14 22:56:56 +02:00
Jeremy Banks
c32f133236
fix: inserted imports must come after a shebang if present
2022-06-15 19:42:43 +00:00
Jeremy Banks
f32ad8362f
add failing test: inserts_after_shebang
2022-06-15 19:42:43 +00:00