Lukas Wirth
465ebbc102
internal: Sort computed runnables
2024-05-14 12:32:48 +02:00
bors
7afd8d8a1a
Auto merge of #17225 - Veykril:expand-macro-interlocked, r=Veykril
...
Expand macro recursively expands both fp-like and attribute macros when intertwined
2024-05-14 09:22:04 +00:00
Lukas Wirth
580b8dab1a
Expand macro recursively expands both fp-like and attribute macros intertwined
2024-05-14 10:58:18 +02:00
Lukas Wirth
5b696bac5c
Don't render multi-line literal values
2024-05-13 12:56:02 +02:00
Lukas Wirth
a39c0493a1
Render literal escaping errors in hovers
2024-05-13 12:51:57 +02:00
Lukas Wirth
253929f6ae
Fix literal hovers being confusing and wrong for floats
2024-05-13 12:26:45 +02:00
Lukas Wirth
e1aeed3aed
Implement unsafe attribute parsing
2024-05-06 12:11:29 +02:00
Wilfred Hughes
c981ff0944
fix: Tracing span names should match function names
...
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-30 11:22:47 -07:00
morine0122
da3fa2b7f0
Fix coercion of async block
2024-04-30 18:31:10 +09:00
bors
935de9d773
Auto merge of #17134 - Veykril:lt-err-display, r=Veykril
...
internal: Don't render unknown lifetimes when rendering generic args
cc https://github.com/rust-lang/rust-analyzer/issues/17098
2024-04-25 07:36:47 +00:00
bors
65eda41e65
Auto merge of #17021 - roife:add-hover-limits-for-adts, r=Veykril
...
Support hovering limits for adts
Fix #17009
1. Currently, r-a supports limiting the number of struct fields displayed when hovering. This PR extends it to support enum variants and union fields. Since the display of these three (ADTs) is similar, this PR extends 'hover_show_structFields' to 'hover_show_adtFieldsOrVariants'.
2. This PR also resolved the problem that the layout of ADT was not restricted by display limitations when hovering on the Self type.
3. Additionally, this PR changes the default value of display limitations to `10` (instead of the original `null`), which helps users discover this feature.
2024-04-25 07:23:27 +00:00
Lukas Wirth
ec941e599a
Add inlay hints lifetime arg tests
2024-04-25 09:10:49 +02:00
bors
4c08e2d32f
Auto merge of #16938 - Nilstrieb:dont-panic-tests, r=Veykril
...
Implement `BeginPanic` handling in const eval
for #16935 , needs some figuring out of how to write these tests correctly
2024-04-21 16:22:02 +00:00
Lukas Wirth
3b9a2af21f
Peek for panic message in test output
2024-04-21 08:50:25 +02:00
roife
aa1f1344cc
fix: remove space within {}
when no fields in struct
2024-04-20 10:07:33 +08:00
roife
43576989a1
Add hovering limitations support for variants
2024-04-20 09:14:00 +08:00
roife
e0e28ec856
fix: add a separate setting for enum variants
2024-04-19 21:45:56 +08:00
Lukas Wirth
6bfdd38c69
Render matched macro arm on hover of macro calls
2024-04-18 10:51:58 +02:00
Alex Kladov
f852a6fc7d
ide: add a new test
2024-04-16 17:17:46 +01:00
Alex Kladov
9bd8eee21e
ide: improve ReferenceCategoryType
...
It is bitset semantically --- many categorical things can be true about
a reference at the same time.
In parciular, a reference can be a "test" and a "write" at the same
time.
2024-04-16 17:17:46 +01:00
roife
6bb85985d7
fix: adjust the limitation for ADTs' fields to 5
2024-04-16 16:28:23 +08:00
roife
c06d670f8f
fix: the fields or variants of ADT was not restricted by limitations when hovering on Self type
2024-04-16 16:27:57 +08:00
roife
01c3559bf3
Update tests and docs for hover_show_adtFieldsOrVariants
2024-04-16 16:27:56 +08:00
roife
21da6c6164
Add config hover_show_adtFieldsOrVariants to handle hovering limitation for ADTs
2024-04-16 16:26:23 +08:00
bors
1179c3ee83
Auto merge of #16639 - alibektas:13529/config_restruct, r=Veykril
...
internal : redesign rust-analyzer::config
This PR aims to cover the infrastructural requirements for the `rust-analyzer.toml` ( #13529 ) issue. This means, that
1. We no longer have a single config base. The once single `ConfigData` has been divided into 4 : A tree of `.ratoml` files, a set of configs coming from the client ( this is what was called before the `CrateData` except that now values do not default to anything when they are not defined) , a set of configs that will reflect what the contents of a `ratoml` file defined in user's config directory ( e.g `~/.config/rust-analyzer/.rust-analyzer.toml` and finally a tree root that is populated by default values only.
2. Configs have also been divided into 3 different blocks : `global` , `local` , `client`. The current status of a config may change until #13529 got merged.
Once again many thanks to `@cormacrelf` for doing all the serde work.
2024-04-16 07:52:07 +00:00
Lukas Wirth
597c293a69
Adjust package.json semantic highlighting items
2024-04-15 17:00:03 +02:00
Lukas Wirth
6b98e55dbb
Add Static and Const highlighting token types
2024-04-15 16:54:17 +02:00
Lukas Wirth
1915980031
fix: Fix impl Trait<Self>
causing stackoverflows
2024-04-15 15:41:20 +02:00
Lukas Wirth
60d3a7320e
Differentiate between full configs and toml only config groupings
2024-04-15 14:16:43 +02:00
Ali Bektas
67d8d2d4a0
Make ConfigData Ser and TOML De
...
This commit makes rust-analyzer::config module TOML ser and de.
Co-Authored-By: Cormac Relf <web@cormacrelf.net>
2024-04-15 14:14:23 +02:00
Lukas Wirth
a483d3bc37
internal: Thread edition through to parsing/tt-to-syntax-tree routines for macros
2024-04-14 16:02:38 +02:00
Lukas Wirth
2c5c12acfe
fix: Fix inlay hint resolution being broken
2024-04-14 08:27:24 +02:00
Lukas Wirth
f3567bb604
Arc CrateData::cfg_options
2024-04-06 13:55:10 +02:00
Lukas Wirth
5957835cdf
Consider exported_name="main"
functions in test modules as tests
2024-04-04 14:51:10 +02:00
Lukas Wirth
86967032f7
Consider ADT generic parameter defaults for unsubstituted layout calculations
2024-04-03 09:01:27 +02:00
Lukas Wirth
707be6b99c
Adjust display impls to respect lifetime bounds
2024-04-02 14:51:08 +02:00
bors
3691380c35
Auto merge of #16920 - Veykril:clippy-lints, r=Veykril
...
internal: Fix new nightly clippy lints
2024-04-01 16:00:18 +00:00
Lukas Wirth
2ae3e57c26
Fix new clippy lints
2024-04-01 17:55:56 +02:00
bors
a8b7acf22f
Auto merge of #16971 - HKalbasi:test-explorer, r=HKalbasi
...
Resolve tests per file instead of per crate in test explorer
Fix part of #16827
2024-03-29 02:06:22 +00:00
hkalbasi
beec6914c8
Resolve tests per file instead of per crate in test explorer
2024-03-29 05:34:43 +03:30
dfireBird
34a8cd6a7a
fix ADT hover considering only type or const len not lifetimes
2024-03-28 21:53:22 +05:30
dfireBird
20b12c2bac
fix lifetime length are not added in count of params in highlight
2024-03-27 23:21:17 +05:30
Young-Flash
58013ad70d
add test for struct field hover display limit
2024-03-25 19:55:19 +08:00
Young-Flash
ba8c9810aa
review update
2024-03-25 19:55:19 +08:00
Young-Flash
a89e417ce5
adjust test
2024-03-25 19:55:19 +08:00
Young-Flash
1c85234bcd
limit struct field hover display nums
2024-03-25 19:55:19 +08:00
Nilstrieb
2dfe7de8b6
Handle panicking like rustc CTFE does
...
Instead of using `core::fmt::format` to format panic messages, which may in turn
panic too and cause recursive panics and other messy things, redirect
`panic_fmt` to `const_panic_fmt` like CTFE, which in turn goes to
`panic_display` and does the things normally. See the tests for the full
call stack.
2024-03-24 15:40:26 +01:00
Lukas Wirth
8e324e98a1
Rename ProcMacroKind::FuncLike to Bang
2024-03-22 11:20:56 +01:00
Lukas Wirth
928d847cc2
Keep the span for Attr::Literal
2024-03-21 10:28:25 +01:00
Lukas Wirth
255a8aef92
Move Edition into span crate
2024-03-21 10:21:44 +01:00
bors
4e54b4bd6c
Auto merge of #16889 - Veykril:utf8-path, r=Veykril
...
internal: Enforce utf8 paths
Cargo already requires this, and I highly doubt r-a works with non-utf8 paths generally either. This just makes dealing with paths a lot easier.
2024-03-19 14:57:18 +00:00
Lukas Wirth
399dbc074b
internal: Enforce utf8 paths
2024-03-19 15:39:00 +01:00
Shoyu Vanilla
967a864d03
fix: Goto implementation to impls inside blocks
2024-03-19 22:04:48 +09:00
bors
7c2bb75bc8
Auto merge of #16860 - Veykril:macarons, r=Veykril
...
feat: Syntax highlighting improvements
Specifically
- Adds a new `constant` modifier, attached to keyword `const` (except for `*const ()` and `&raw const ()`), `const` items and `const` functions
- Adds (or rather reveals) `associated` modifier for associated items
- Fixes usage of the standard `static` modifier, now it acts like `associated` except being omitted for methods.
- Splits `SymbolKind::Function` into `Function` and `Method`. We already split other things like that (notable self param from params), so the split makes sense in general as a lot special cases around it anyways.
2024-03-18 09:14:08 +00:00
Lukas Wirth
4a93368590
Use a hash to find the correct inlay hint when resolving
2024-03-18 09:51:51 +01:00
Lukas Wirth
3115fd8b41
Simplify inlay hints needs_resolve
2024-03-18 09:50:27 +01:00
roife
109344cfb7
fix: handle attributes when typing curly bracket
2024-03-18 13:29:14 +08:00
Lukas Wirth
20d521db74
Adjust benchmark_syntax_highlighting_parser
for changes
2024-03-17 11:38:10 +01:00
Lukas Wirth
77607ab99a
More precise highlighting rules for constant modifier
2024-03-17 11:26:05 +01:00
Lukas Wirth
23fff55f0c
Split SymbolKind::Function into Function and Method
2024-03-17 11:07:22 +01:00
Lukas Wirth
c8f6655327
Don't emit modifiers depending on the symbol kind in lsp conversion layer
2024-03-17 10:40:32 +01:00
Lukas Wirth
66adc1cc94
Emit Const
modifier in syntax highlighting for const-like things
2024-03-17 10:35:33 +01:00
bors
b94c2852fa
Auto merge of #16856 - Veykril:macarons, r=Veykril
...
fix: Fix wrong where clause rendering on hover
We were not accounting for proper newline indentation in some places making the hover look weird (or just straight up wrong for type aliases)
2024-03-16 17:23:02 +00:00
Lukas Wirth
d69a81fddb
fix: Fix wrong where clause rendering on hover
2024-03-16 17:49:59 +01:00
hkalbasi
dcfc9ccace
Distinguish integration tests from crates in test explorer
2024-03-15 17:16:28 +03:30
Lukas Wirth
d2f8eae2ec
feat: Support macro calls in eager macros for IDE features
2024-03-14 15:40:35 +01:00
Wilfred Hughes
30d3d68044
Fix unwanted leading whitespace in hover text
...
PR #16366 moved layout information to a separate line, so the
leading whitespace is no longer necessary.
2024-03-12 12:27:57 -07:00
Lukas Wirth
9ba4493918
internal: Improve rooted upmapping
2024-03-12 13:46:58 +01:00
bors
8f8bcfc131
Auto merge of #16335 - lnicola:salsa-lz4-file-text, r=Veykril
...
internal: Compress file text using LZ4
I haven't tested properly, but this roughly looks like:
```
1246 MB
59mb 4899 FileTextQuery
1008 MB
20mb 4899 CompressedFileTextQuery
555kb 1790 FileTextQuery
```
We might want to test on something more interesting, like `bevy`.
2024-03-11 13:43:33 +00:00
bors
2f872156fe
Auto merge of #16808 - ShoyuVanilla:proc-macro-sem-token, r=Veykril
...
feat: Add proc macro semantic token type
Closes #11529
2024-03-11 13:20:29 +00:00
Shoyu Vanilla
fc11216ad5
feat: Add proc macro semantic token type
2024-03-11 22:14:59 +09:00
bors
2320e12541
Auto merge of #16771 - Veykril:self-param-split, r=Veykril
...
internal: Don't desugar self param into a pattern
Small experiment to see if this simplifies things
2024-03-11 12:45:46 +00:00
bors
1069f57d8b
Auto merge of #16784 - Veykril:body-invalid, r=Veykril
...
internal: Remove synstructure const hack support
The latest version of it no longer emits these
2024-03-11 09:05:26 +00:00
Lukas Wirth
458f4a2960
internal: Treat the self param as different from patterns when lowering
2024-03-11 09:46:28 +01:00
Lukas Wirth
558feeab61
internal: Remove synstructure const hack support
2024-03-11 09:44:40 +01:00
Laurențiu Nicola
ce642071d8
Bring back in-rust-tree feature to ide
2024-03-10 11:08:11 +02:00
Laurențiu Nicola
aa74d57825
Merge commit '574e23ec508064613783cba3d1833a95fd9a5080' into sync-from-ra
2024-03-10 08:47:38 +02:00
Laurențiu Nicola
0f43b55e83
Stop using an Arc when setting the file text
2024-03-08 20:30:12 +02:00
bors
b85d38f7d6
Auto merge of #16755 - Veykril:rustup-bins, r=Veykril
...
For toolchain binaries use the full path found in $PATH
Fixes https://github.com/rust-lang/rust-analyzer/issues/16754
2024-03-06 14:47:32 +00:00
hkalbasi
44be2432f5
Add test explorer
2024-03-06 00:05:29 +03:30
roife
9cc3a9cfc2
fix: formatting
2024-03-05 19:55:31 +08:00
roife
16995ceda9
test: add tests for constants inside range pattern
2024-03-05 19:31:20 +08:00
bors
2898c4217d
Auto merge of #16758 - Veykril:cargo-lock, r=Veykril
...
Update Cargo.lock
2024-03-05 11:17:42 +00:00
Lukas Wirth
00a6cc0664
Update Cargo.lock
2024-03-05 12:16:19 +01:00
Lukas Wirth
b20e467373
internal: Adjust a few things for trait assoc item hovers
2024-03-05 11:06:36 +01:00
Lukas Wirth
c310aee8d6
For toolchain binaries ue the full path found in $PATH
2024-03-05 10:17:09 +01:00
bors
ce3216e0ae
Auto merge of #15938 - Young-Flash:display_trait_item_when_hover, r=Veykril
...
feat: add hover display for trait assoc items
This PR enable preview assoc items when hover on `trait`
![image](https://github.com/rust-lang/rust-analyzer/assets/71162630/d9c3949c-33cf-4a32-aa97-3af46b28033a )
inspired by https://github.com/rust-lang/rust-analyzer/pull/15847
2024-03-05 08:26:53 +00:00
Lukas Wirth
b9dbb8afd9
Regenerate lints table
2024-03-04 17:42:18 +01:00
Lukas Wirth
0964374274
Move diagnostics docs generation into xtask/codegen
2024-03-04 17:14:14 +01:00
bors
99a1b8f7a8
Auto merge of #16747 - Veykril:cleanup, r=Veykril
...
internal: Clean some stuff up
Just a bunch of small refactorings, mainly from browsing through `hir-def`
2024-03-04 10:30:17 +00:00
Lukas Wirth
4303e741de
Cleanup
2024-03-04 11:10:06 +01:00
bors
d8feb908be
Auto merge of #16703 - regexident:sema-ast-to-hir, r=Veykril
...
Add more methods for resolving definitions from AST to their corresponding HIR types
In order to be able to add these methods with consistent naming I had to also rename two existing methods that would otherwise be conflicting/confusing:
`Semantics::to_module_def(&self, file: FileId) -> Option<Module>` (before)
`Semantics::file_to_module_def(&self, file: FileId) -> Option<Module>` (after)
`Semantics::to_module_defs(&self, file: FileId) -> impl Iterator<Item = Module>` (before)
`Semantics::file_to_module_defs(&self, file: FileId) -> impl Iterator<Item = Module>` (after)
(the PR is motivated by an outside use of the `ra_ap_hir` crate that would benefit from being able to walk a `hir::Function`'s AST, resolving its exprs/stmts/items to their HIR equivalents)
2024-03-04 09:02:32 +00:00
bors
0b7d4cc6ff
Auto merge of #16690 - roife:fix-issue-16471, r=Veykril
...
fix: use 4 spaces for indentation in macro expansion
Partial fix for #16471 .
In the previous code, the indentation produced by macro expansion was set to 2 spaces. This PR modifies it to 4 spaces for the sake of consistency.
2024-03-04 08:49:51 +00:00
Laurențiu Nicola
80470d5ce8
Merge commit '4ef6a49b44e8aa380da7522442234bfd7a52c55e' into sync-from-ra
2024-03-03 09:17:31 +02:00
bors
4ef6a49b44
Auto merge of #16702 - Veykril:intra-doc-links-generic, r=Veykril
...
fix: Ignore generic arguments in intra doc link path resolution
Fixes https://github.com/rust-lang/rust-analyzer/issues/16699
2024-03-02 09:51:16 +00:00
Young-Flash
dba67b46a1
update for review
2024-03-02 10:01:04 +08:00
Lukas Wirth
aabaa47bfb
fix: Don't highlight related assoc items of super traits
2024-03-01 14:03:12 +01:00
bors
b3b9b53df8
Auto merge of #16706 - Veykril:load-cargo-ide-db, r=Veykril
...
internal: Remove load-cargo dependency on ide
This lightens up the dep tree for projects using r-a as a library that do not need the ide crate itself.
2024-02-29 14:59:27 +00:00
Lukas Wirth
4ee0dbdc04
internal: Remove load-cargo dependency on ide
2024-02-28 16:59:04 +01:00
Shoyu Vanilla
83f6dd14f8
Add a new failing test for Goto index_mut definition
2024-02-29 00:52:30 +09:00
Lukas Wirth
ab533d887d
fix: Ignore generic arguments in intra doc link path resolution
2024-02-28 14:47:47 +01:00
Vincent Esche
6112ddfabb
Add prefix file_
to Semantics
's to_module_defs()
/to_module_def()
methods
2024-02-28 10:27:28 +01:00
Shoyu Vanilla
d1bdebf2b9
Add a new failing test for goto deref_mut
2024-02-27 23:54:05 +09:00
roife
ec5236f3a8
test: use 4 spaces for indetation in macro expansion
2024-02-27 20:53:07 +08:00
Lukas Wirth
91554e0ae7
fix: Fix modules in blocks not resolving in ide layer
2024-02-26 14:54:47 +01:00
Laurențiu Nicola
9e4ecc60a5
Merge commit '4a8d0f7f565b6df45da5522dd7366a4df3460cd7' into sync-from-ra
2024-02-25 09:45:26 +02:00
Young-Flash
2e87f31fe9
add HoverDisplayConfig
2024-02-22 17:37:40 +08:00
Young-Flash
35ec5955eb
add config item for hover display
2024-02-21 11:08:45 +08:00
Young-Flash
00358b1fe0
rebase on lastest master
2024-02-21 10:57:39 +08:00
Young-Flash
dba167592e
feat: add hover display for trait assoc items
2024-02-21 10:57:39 +08:00
bors
c8887241f9
Auto merge of #16606 - Veykril:hover-extern, r=Veykril
...
internal: Render assoc item owner in hover for items other than functions
Closes https://github.com/rust-lang/rust-analyzer/issues/16603
2024-02-20 13:51:47 +00:00
Lukas Wirth
85203d9721
Render assoc item owner in hover for items other than functions
2024-02-20 13:16:12 +01:00
Lukas Wirth
d93096ecc0
internal: Fetch toolchain and datalayout for DetachedFiles
2024-02-20 10:40:39 +01:00
Lukas Wirth
a822291a02
Infallible definition hovers
2024-02-19 18:16:02 +01:00
UserIsntAvailable
6dd5dc10ef
test: fix disallow_renaming_for_non_local_definition
to follow PR changes.
2024-02-19 12:38:00 +01:00
UserIsntAvailable
6e16edb3bf
feat: append as <name>
when renaming inside an "UseTree".
...
test: include `rename_path_inside_use_tree`.
Keeps tracks the progress of the changes. 3 other tests broke with the changes
of this.
feat: rename all other usages within the current file.
feat: fix most of the implementation problems.
test: `rename_path_inside_use_tree` tests a more complicated scenario.
2024-02-19 12:24:36 +01:00
Laurențiu Nicola
6b17dba68c
Merge commit 'ac998a74b3c8ff4b81c3eeb9a18811d4cc76226d' into sync-from-ra
2024-02-18 09:41:20 +02:00
Lukas Wirth
ead369117a
CrateOrigin::Local means local to the project workspace, not cargo workspace
2024-02-16 16:28:17 +01:00
Lukas Wirth
b1404d387a
fix: Split toolchain and datalayout out of CrateData
2024-02-16 14:48:25 +01:00
Wilfred Hughes
dda641c62c
Set documentation field in SCIP from doc comment
...
Previously, the documentation field was the same as the text shown to
users when they hover over that symbol. The documentation should
really just be the doc comment, and as of #16179 the signature is
already stored in the signatureDocumentation field.
2024-02-14 14:46:32 -08:00
Lukas Wirth
1e6cef94df
fix: Fix build scripts not being rebuilt in some occasions
2024-02-14 15:20:45 +01:00
Chengxu Bian
ca64359945
remove eprintln! overwrite
2024-02-12 23:54:32 -05:00
Tavo Annus
125791386d
Cleanup term search related changes
2024-02-11 14:35:54 +02:00
Laurențiu Nicola
e41ab350d6
Merge commit 'ddf105b646c6749a2de2451c9a499a354eec79c2' into sync-from-ra
2024-02-11 08:40:19 +02:00
bors
1ef7a2329b
Auto merge of #16525 - Veykril:item-loc, r=Veykril
...
Abstract more over ItemTreeLoc-like structs
Allows reducing some code duplication by using functions generic over said structs. The diff isn't negative due to me adding some additional impls for completeness.
2024-02-10 10:47:37 +00:00
Lukas Wirth
2ebf0c87c2
Deduplicate some code
2024-02-10 01:51:22 +01:00
Tetsuharu Ohzeki
8c2f301a41
ide: Fix warnings about clippy str_to_string
rule
2024-02-10 01:00:40 +09:00
Tetsuharu Ohzeki
adddd14afb
ide: Fix cargo test -p ide --doc
2024-02-10 00:14:17 +09:00
Tetsuharu Ohzeki
a3e60e7f7a
clippy: Enable needless_doctest_main
rule
2024-02-10 00:14:17 +09:00
Lukas Wirth
ddddc9c0e2
Update test outputs
2024-02-08 14:57:21 +01:00
Lukas Wirth
81ea48a573
fix: Fix tuple structs not rendering visibility in their fields
2024-02-08 10:05:28 +01:00
bors
66cec4d11a
Auto merge of #16470 - Veykril:clippy-disallow, r=lnicola
...
internal: Lint debug prints and disallowed types with clippy
2024-02-05 17:20:43 +00:00
Laurențiu Nicola
b8a3180a60
Merge commit '0113bc9388b480fa42c632f57f4f0f7af5813ec1' into sync-from-ra
2024-02-04 10:37:58 +02:00
bors
8f6a72871e
Auto merge of #16469 - Young-Flash:ci_typos, r=lnicola
...
internal: add typos check CI (part 2)
follow up https://github.com/rust-lang/rust-analyzer/pull/16448
2024-02-02 12:02:48 +00:00
Young-Flash
ba2910a3a7
minor: correct some typos
2024-02-02 18:22:54 +08:00
Lukas Wirth
9e8a0fae0c
Lint debug prints and disallowed types with clippy
2024-02-01 17:57:27 +01:00
Johann Hemmann
04ccef80cb
field_reassign_with_default
2024-01-31 19:06:18 +01:00
bors
355c9444e1
Auto merge of #16448 - Young-Flash:typos, r=lnicola
...
minor: correct typos
I use [crate-ci/typos](https://github.com/crate-ci/typos ) to check typos in codebase, if it's ok with you, I'd like to add a typo check CI using [typos](https://github.com/crate-ci/typos ) (with Apache-2.0, MIT licenses).
BTW, we can add a [_typos.toml](https://github.com/crate-ci/typos/blob/master/docs/reference.md ) as white list for some intentional typos
2024-01-31 13:29:55 +00:00
bors
2661c272c9
Auto merge of #16461 - Veykril:expansion-info, r=Veykril
...
internal: Remove unnecessary usages of ExpansionInfo
And some follow up simplifications to https://github.com/rust-lang/rust-analyzer/pull/16439
2024-01-31 08:58:55 +00:00
Lukas Wirth
d252247ab7
internal: Remove unnecessary usages of ExpansionInfo
2024-01-31 09:57:17 +01:00
bors
e4146af294
Auto merge of #16441 - Young-Flash:exclude_tests_refs, r=Veykril
...
feat: enable excluding refs search results in test
## Change
Here I introduce a new `ReferenceCategory::Test` type to indicate whether the function where this reference is located is marked as `#[test]`, and expose an config item (`rust-analyzer.references.excludeTests`) to client.
I also changed the signature of `ReferenceCategory::new`, adding a `sema: &Semantics<'_, RootDatabase>` param to do some hir analysis. Hope the current implementation is good to go.
## Demo
`"rust-analyzer.references.excludeTests": false`
![include](https://github.com/rust-lang/rust-analyzer/assets/71162630/9f1176d4-7b41-4f49-ac79-55d25a42d5d1 )
`"rust-analyzer.references.excludeTests": true`
![exclude](https://github.com/rust-lang/rust-analyzer/assets/71162630/2938b44b-9e5b-48de-a049-453f5bbc09d0 )
close https://github.com/rust-lang/rust-analyzer/issues/14530
2024-01-31 07:53:28 +00: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
Young-Flash
db9fd370ee
minor: correct typos
2024-01-30 21:43:43 +08:00
bors
11b401d0b4
Auto merge of #16447 - Veykril:mir-errors, r=Veykril
...
intenral: Cleanup error variants in MIR code a bit
2024-01-30 11:38:41 +00:00
bors
22b6f9679d
Auto merge of #16439 - wasd96040501:feat/gotodef3, r=Veykril
...
feat: Support for GOTO def from *inside* files included with include! macro
close #14937
Try to implement goto def from *inside* files included with include! macro.
This implementation has two limitations:
1. Only **one** file which calls include! will be tracked. (I think multiple file be included is a rare case and we may let it go for now)
2. Mapping token from included file to macro call file (semantics.rs:646~658) works fine but I am not sure is this the correct way to implement.
2024-01-30 11:27:18 +00:00
Lukas Wirth
5860763f18
Cleanup error variants in MIR code slightly
2024-01-30 09:53:39 +01:00
Young-Flash
2b71acac4f
test: add full path ref exclude test case
2024-01-29 18:47:58 +08:00
Laurențiu Nicola
f43cea0878
Merge commit '7219414e81810fd4d967136c4a0650523892c157' into sync-from-ra
2024-01-28 15:56:54 +02:00
Young-Flash
1bd21e98c0
test: add test for excluding refs
2024-01-28 18:39:42 +08:00
Young-Flash
6f303f49fe
feat: enable excluding refs search results in test
2024-01-28 18:28:13 +08:00