Wilfred Hughes
d68e549205
internal: Fix rustdoc warnings
...
`cargo doc` generates a bunch of warnings on rust-analyzer. Fix all the
bare URL and empty code block warnings.
2024-06-13 17:29:10 -07:00
Wilfred Hughes
27182bb96b
chore: Prefer tracing span shorthand macros
2024-06-06 16:52:25 -07:00
bors
6a16749eb0
Auto merge of #17277 - Veykril:find-path-fixes, r=Veykril
...
fix: Various find path fixes
Fixes https://github.com/rust-lang/rust-analyzer/issues/17271
2024-05-22 18:22:32 +00:00
Lukas Wirth
c88b421853
fix: Fix general find-path inconsistencies
2024-05-22 14:05:24 +02:00
Lukas Wirth
cd9e90cc71
Update builtin tool list
2024-05-18 10:52:05 +02:00
Lukas Wirth
8e324e98a1
Rename ProcMacroKind::FuncLike to Bang
2024-03-22 11:20:56 +01:00
Lukas Wirth
255a8aef92
Move Edition into span crate
2024-03-21 10:21:44 +01:00
Lukas Wirth
9ba4493918
internal: Improve rooted upmapping
2024-03-12 13:46:58 +01:00
Lukas Wirth
4303e741de
Cleanup
2024-03-04 11:10:06 +01:00
Lukas Wirth
efd76ecff1
Move AstIdMap infra to the span crate
2024-03-01 15:39:44 +01:00
Lukas Wirth
91554e0ae7
fix: Fix modules in blocks not resolving in ide layer
2024-02-26 14:54:47 +01:00
Lukas Wirth
d93096ecc0
internal: Fetch toolchain and datalayout for DetachedFiles
2024-02-20 10:40:39 +01:00
Young-Flash
ba2910a3a7
minor: correct some typos
2024-02-02 18:22:54 +08: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
Lukas Wirth
8a5829cf28
Re-order mod declarations
2024-01-27 11:02:34 +01:00
Lukas Wirth
2d72ec71ec
Deduplicate
2024-01-15 10:58:05 +01:00
Lukas Wirth
b6e6d5d3af
internal: Consider all kinds of explicit private imports in find_path
2024-01-11 12:22:04 +01:00
Patryk Wychowaniec
76aaf17794
Suggest pub(crate)
imports
...
rust-analyzer has logic that discounts suggesting `use`s for private
imports, but that logic is unnecessarily strict - for instance given
this code:
```rust
mod foo {
pub struct Foo;
}
pub(crate) use self::foo::*;
mod bar {
fn main() {
Foo$0;
}
}
```
... RA will suggest to add `use crate::foo::Foo;`, which not only makes
the code overly verbose (especially in larger code bases), but also is
disjoint with what rustc itself suggests.
This commit adjusts the logic, so that `pub(crate)` imports are taken
into account when generating the suggestions; considering rustc's
behavior, I think this change doesn't warrant any extra configuration
flag.
Note that this is my first commit to RA, so I guess the approach taken
here might be suboptimal - certainly feels somewhat hacky, maybe there's
some better way of finding out the optimal import path 😅
2024-01-10 18:21:16 +01:00
Lukas Wirth
9d24764624
internal: Cleanup Expander a bit
2023-12-22 13:01:13 +01:00
Lukas Wirth
51a9e7831a
Rename some things and turn macro to macro def into a query
2023-12-21 09:18:25 +01:00
Lukas Wirth
35620306a6
internal: Move proc-macro knowledge out of base-db
2023-12-18 12:37:18 +01:00
cui fliter
056b6b9416
remove the repetitive word
...
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-09-02 14:18:10 +08:00
Lukas Wirth
af8048266c
Prepare ItemScope for IDE import resolution
2023-08-16 11:33:42 +02:00
Lukas Wirth
9adff006e8
Simplify
2023-08-10 20:10:19 +02:00
Lukas Wirth
fde2d9b47c
Deduplicate FileId field in ModuleOrigin
2023-08-10 19:04:46 +02:00
Lukas Wirth
e5b23e3bc1
Derive block attributes from block item tree
2023-08-10 18:52:27 +02:00
Lukas Wirth
992b928a93
Record import source IDs
2023-08-09 15:20:42 +02:00
Ryo Yoshida
a02846343f
Fix self
and super
path resolution in block modules
2023-06-27 15:29:08 +09:00
Lukas Wirth
58ac823864
Less eager parsing for module sources
2023-06-17 10:58:52 +02:00
Lukas Wirth
cf178cba8f
internal: Add a CrateRootModuleId that encodes a module id that is always a crate root
2023-06-14 15:41:06 +02:00
Lukas Wirth
11b937177b
Skip extern prelude path resolution in block def maps
2023-06-01 17:58:08 +02:00
Lukas Wirth
54e3ef658a
Rename nameres::CrateData to DefMapCrateData
2023-06-01 15:50:19 +02:00
Lukas Wirth
1e6406e223
Move extern prelude into CrateData
2023-06-01 15:49:05 +02:00
Lukas Wirth
bdca349573
Arc DefMap::data so the block def maps can share it
2023-06-01 15:27:05 +02:00
Lukas Wirth
5c466ccc2b
Refactor out some crate wide data in DefMap into nested struct
2023-06-01 15:04:38 +02:00
Lukas Wirth
dc7c6d43c7
Slightly shrink DefMap
2023-06-01 14:46:36 +02:00
Lukas Wirth
bbd9e41606
Don't add --all-targets to runnables for no-std crates
2023-05-28 14:18:44 +02:00
Lukas Wirth
c7ef6c25b7
internal: Replace Display impl for Name
2023-05-24 20:55:12 +02:00
Ryo Yoshida
68a74decb6
Process macro_use
prelude in semantic scope resolver
2023-05-17 17:45:44 +09:00
Ryo Yoshida
f2a35deb50
Consider macro sub-namespace during name resolution
2023-05-11 21:13:12 +09:00
Ryo Yoshida
3203ea896d
Add macro_use
prelude to DefMap
2023-05-11 21:13:11 +09:00
Laurențiu Nicola
7197a27028
Use triomphe Arc
2023-05-02 20:02:43 +03:00
Lukas Wirth
c32d51979d
internal: Make block_def_map infallible
2023-04-14 13:17:38 +02:00
Lukas Wirth
f34b2469bd
lint incoherent inherent impls
2023-03-14 19:20:44 +01:00
Lukas Wirth
1a9fbf0a6d
fix: Fix visibility resolution not respecting parent blocks
2023-03-14 13:42:08 +01:00
Ryo Yoshida
443801755c
Refactor
...
- Remove unnecessary references and derefs
- Manual formatting
2023-02-19 23:55:49 +09: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
Amos Wenger
318fdacaf8
Merge commit '65e1dc4d9' into HEAD
2022-11-25 12:58:18 +01:00
Amos Wenger
2566e06da1
Merge commit '8e38833c3674c1be7d81c6069c62e6ed52b18b27' into HEAD
2022-11-25 12:01:49 +01:00
Laurențiu Nicola
65e1dc4d9c
⬆️ rust-analyzer
2022-09-06 21:20:49 +03:00