Commit Graph

13765 Commits

Author SHA1 Message Date
Laurențiu Nicola
bff377c712 Clean up some unused cross-crate dependencies 2021-12-05 13:54:49 +02:00
bors[bot]
1cf1359c55
Merge #10937
10937: fix: Add highlighting hack back for unresolved attributes r=Veykril a=Veykril

cc https://github.com/rust-analyzer/rust-analyzer/issues/10935
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-12-05 11:02:55 +00:00
Lukas Wirth
9b4ca77572 fix: Add highlighting hack back for unresolved attributes 2021-12-05 11:59:07 +01:00
bors[bot]
8a084e6aca
Merge #10902
10902: Handle multiple cargo check quick fix spans r=Veykril a=brandondong

Resolves https://github.com/rust-analyzer/rust-analyzer/issues/10705.

**Cause:**
- For a cargo check diagnostic with multiple spans, only a single quick fix action would be created at the location of `spans[0]`. Additionally, the hover window details would only show the location of `spans[0]` next to the message.

**Fix:**
- Allow cargo check quick fix actions to be triggerable from multiple selection ranges. Specifically, if the selection intersects with any of the replacement spans, the quick fix action is shown.
- No change in behavior for the hover window details. It's pretty minor and I think showing multiple locations next to the message may be more confusing anyways.

Co-authored-by: Brandon <brandondong604@hotmail.com>
2021-12-05 10:52:54 +00:00
Brandon
fa2818551e Update expected test results 2021-12-04 21:42:13 -08:00
Brandon
0d1910c6fb Handle multiple cargo check quick fix spans 2021-12-04 21:41:56 -08:00
Brandon
de05c3d406 Refactor away unnecessary Vec 2021-12-04 19:59:05 -08:00
bors[bot]
6434ada19e
Merge #10930
10930: fix: Fix self keyword not being tagged as such in highlighting properly r=Veykril a=Veykril

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/10575
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-12-04 18:08:11 +00:00
Lukas Wirth
b35a50cb10 fix: Fix self keyword not being tagged as such in highlighting properly 2021-12-04 19:07:18 +01:00
bors[bot]
372a7cf981
Merge #10929
10929: internal: Split up macro/attribute semantic tokens a bit more r=Veykril a=Veykril

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/9172

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-12-04 17:33:16 +00:00
Lukas Wirth
3472105ad9 Update semantic token docs 2021-12-04 18:23:25 +01:00
Lukas Wirth
e4f2d0e3a8 Introduce SymbolKind::Derive 2021-12-04 18:18:09 +01:00
Lukas Wirth
642c1eb720 Introduce SymbolKind::Attribute 2021-12-04 18:01:22 +01:00
Laurențiu Nicola
b7368d34a6 Bump pulldown-cmark-to-cmark 2021-12-04 15:21:04 +02:00
Laurențiu Nicola
076f2247f2 Bump miow 2021-12-04 15:17:30 +02:00
Laurențiu Nicola
f2a1082c84 Bump countme 2021-12-04 15:14:31 +02:00
Laurențiu Nicola
26aba38168 Bump chalk 2021-12-04 15:08:43 +02:00
Laurențiu Nicola
89a1256f9a Bump most deps 2021-12-04 15:08:37 +02:00
bors[bot]
5c00c3e8d4
Merge #10921
10921: minor: Update list of safe intrinsics r=Veykril a=Veykril

Closes https://github.com/rust-analyzer/rust-analyzer/issues/4798
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-12-03 23:52:28 +00:00
Lukas Wirth
144200c821 minor: Update list of safe intrinsics 2021-12-04 00:51:50 +01:00
bors[bot]
ea199dcbec
Merge #10920
10920: minor: Shorten spans of mismatched_arg_count diag r=Veykril a=Veykril

Fixes #5289
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-12-03 23:27:50 +00:00
Lukas Wirth
045014c17e minor: Shorten spans of mismatched_arg_count diag 2021-12-04 00:27:29 +01:00
bors[bot]
bf76226148
Merge #10916
10916: feat: ide: Convert while let to loop r=Veykril a=rainy-me

close #10901

Co-authored-by: rainy-me <github@yue.coffee>
2021-12-03 20:21:55 +00:00
rainy-me
79b4e67b4f fix: defer condition construction 2021-12-04 04:50:06 +09:00
bors[bot]
3f3289df2a
Merge #10915
10915: feat: Resolve builtin-attr and tools in ide layer r=Veykril a=Veykril



Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-12-03 19:28:36 +00:00
Lukas Wirth
8da850b6d5 Improve hover message for inert attributes 2021-12-03 20:28:15 +01:00
rainy-me
fb90bf9cad feat: handle while let to loop 2021-12-04 03:19:19 +09:00
Lukas Wirth
d174158abc Rename things: Tool -> ToolModule 2021-12-03 17:15:19 +01:00
Lukas Wirth
70b8331fd5 Basic hover for builtin-attr and tool modules 2021-12-03 17:10:56 +01:00
Lukas Wirth
db559e5049 Simplify 2021-12-03 17:07:06 +01:00
Lukas Wirth
d1677f3286 Remove syntax highlighting hack for builtin attrs 2021-12-03 16:54:34 +01:00
Lukas Wirth
e58af219a4 feat: Resolve builtin-attr and tools in ide layer 2021-12-03 16:32:17 +01:00
Skyler Rain Ross
5b59a5eca8
refactor(assist/add_return_type): avoid threading needs_whitespace 2021-12-02 10:46:07 -08:00
Skyler Rain Ross
e031267602
fix: add return type works when there's missing whitespace 2021-12-02 09:28:18 -08:00
bors[bot]
b68cd6eda2
Merge #10891
10891: fix: emit trait names in moniker identifier r=Veykril a=tjdevries

Hi,

Not sure if this is the best fix for the problem, but I noticed that functions that part of a trait are not namespaced with the trait name, so this could lead to problems if you had a function and a trait-function both defined in the same module.

Thanks!

TJ

Co-authored-by: TJ DeVries <devries.timothyj@gmail.com>
2021-12-02 11:21:59 +00:00
TJ DeVries
6870bfd099 fixup: include more information for impls 2021-12-02 00:04:03 -05:00
TJ DeVries
d50f18fb65 fixup: properly handle all associated items 2021-12-01 11:43:52 -05:00
Jake Heinz
30b0464ed8 add a fixme: 2021-12-01 12:26:27 +00:00
Jake Heinz
ba92bb1ed9 simplify 2021-12-01 12:25:08 +00:00
Jake Heinz
d2480ecb9f ide: hack to make self not unresolved reference in async trait wrapped impl's 2021-12-01 12:17:20 +00:00
Jake Heinz
b357569d0f add test 2021-12-01 10:28:18 +00:00
Jake Heinz
fec2d39f3c simplify?? 2021-12-01 09:23:42 +00:00
Jake Heinz
a1b2d25810 hir: resolve assoc trait type 2021-12-01 08:44:30 +00:00
TJ DeVries
09c7e22ec2 fix: emit trait names in moniker identifier 2021-11-30 11:16:11 -05:00
bors[bot]
2d0db312b5
Merge #10872
10872: ide_db: build symbol index from crate def map r=Veykril a=jhgg

fixes #4842, #10764

Is this looking correct? 👀 

- [x] build the symbol index based upon the CrateDefMap for the given crate in `crate_symbols`
   - [x] make it multi threaded again, and figure out how to cache each moduleid's symbol index in salsa.
   - [x] NavigationTarget for names in macros is wrong, need to figure out how to compute a text range in the original file id?
   - [x] cleanup some duped code
   - [x] collect macros from `ItemScope.declared_macros()` into symbol index.
        - [x] store declared macros in `ItemScope` so we can figure out where macros were defined for the index.  
   - [x] do something about `SymbolIndex::for_files` - ideally it should use the new module symbol index stuff. 
       - [x] delete `source_file_to_file_symbols` & co...
           - [x] figure out what to do about `library_symbols` 
           - [x] maybe... speed up the new `library_symbols` - the new impl is probably much slower, and definitely much less parallel. **deciding to do nothing here, we can optimize later if necerssary.** 
   - [x] fix failing test: `navigation_target::tests::test_nav_for_symbol` - notably the crate def map doesn't seem to find declarations inside function. 
       - [x] now a bunch of other tests are failing around auto_import & qualify_path handlers. :(
           - [x] need to assoc items in traits and impls
 

Co-authored-by: Jake Heinz <jh@discordapp.com>
2021-11-30 14:07:39 +00:00
Jake Heinz
f4bf750016 simpler way of grabbing module / trait name 2021-11-30 08:24:07 +00:00
Jake Heinz
b0c7ff39b8 remove one need for semantics 2021-11-30 04:50:09 +00:00
Jake Heinz
54fc98920b consts with inners?? 2021-11-30 03:21:17 +00:00
Jake Heinz
492b169224 pr feedbacks 2021-11-30 03:09:38 +00:00
bors[bot]
393cbd0982
Merge #10841
10841: Emit moniker in lsif r=Veykril a=HKalbasi

fix #10559 

Co-authored-by: hkalbasi <hamidrezakalbasi@protonmail.com>
Co-authored-by: HKalbasi <45197576+HKalbasi@users.noreply.github.com>
2021-11-29 11:13:39 +00:00