Commit Graph

13733 Commits

Author SHA1 Message Date
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
Jake Heinz
0abf236445 test the one thing this pr was trying to accomplish lol... 2021-11-29 10:43:51 +00:00
Jake Heinz
f0bfe310a2 add a test 2021-11-29 10:36:22 +00:00
Jake Heinz
97105e1288 some more cleanups 2021-11-29 09:52:03 +00:00
Jake Heinz
1280887561 do something with library_symbols 2021-11-29 09:36:00 +00:00
hkalbasi
1409781c45 fix tests 2021-11-29 11:25:53 +03:30
hkalbasi
df261c10b9 remove duplicate data from CrateOrigin 2021-11-29 11:10:39 +03:30
Jake Heinz
176f4da77a simplify work 2021-11-29 07:17:18 +00:00
Jake Heinz
6e89fb6f73 🧹 2021-11-29 05:42:46 +00:00
Jake Heinz
6cf9969546 collect macro_rules! macros into macro declarations 2021-11-29 05:28:22 +00:00
Jake Heinz
1ed5699355 collect macros 2021-11-29 05:22:30 +00:00
Jake Heinz
d69e0dab56 cleanup the whole thing... 2021-11-29 03:54:52 +00:00
Jake Heinz
aecb9a378c traverse even more... 2021-11-29 02:07:16 +00:00
Jake Heinz
9387e2d919 populate container name when traversing down blocks 2021-11-29 01:32:47 +00:00
Jake Heinz
8fa1d9bb47 collect blocks from unnamed consts too 2021-11-29 01:11:31 +00:00
Jake Heinz
8850ea0b4f collect defs from body blocks 2021-11-29 01:09:39 +00:00
Jake Heinz
8307d38dc1 cleanups 2021-11-28 00:42:42 +00:00
bors[bot]
d9b2291f54
Merge #10876
10876: fix: Show parameter hints unconditionally for logical not expressions r=Veykril a=Veykril

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

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-11-27 18:14:59 +00:00
Lukas Wirth
76022bfd60 fix: Show parameter hints unconditionally for logical not expressions 2021-11-27 19:14:36 +01:00
Lukas Wirth
3fcbcf4a0e Don't discard flycheck error messages 2021-11-27 18:57:51 +01:00
Aleksey Kladov
ba414bc2ae minor: correct profiling name 2021-11-27 19:11:39 +03:00
Aleksey Kladov
a1aa8212ef minor: if-let-else to shorter match 2021-11-27 18:18:00 +03:00
Jake Heinz
e033d8c2a2 make navigation target go to original file location 2021-11-27 13:48:50 +00:00
Jake Heinz
a7370c5725 remove file symbols 2021-11-27 13:00:02 +00:00
Jake Heinz
377162c0f8 container name? 2021-11-27 12:27:43 +00:00
Jake Heinz
a1030b07ab use Semantics::parse_or_expand in another place 2021-11-27 11:55:03 +00:00
Jake Heinz
a69af9daa3 sema parse_or_expand 2021-11-27 11:49:51 +00:00
Jake Heinz
0447be7589 wip 2021-11-27 11:25:05 +00:00
Jake Heinz
dca8f612d0 ide: fix expansion for 'as _' 2021-11-27 02:22:21 +00:00
Jonas Schievink
c291e5e284 Use the right ItemTree when re-resolving attr 2021-11-26 03:57:25 +01:00
Jonas Schievink
3bb6f506ee Build per-block ItemTrees 2021-11-26 00:17:20 +01:00
HKalbasi
a654955159
Update crates/project_model/src/workspace.rs
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-11-25 20:03:43 +03:30
bors[bot]
91cb422e1a
Merge #10859
10859: fix: Prioritize tuple fields in highlight_related r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-11-25 15:35:18 +00:00