Commit graph

20220 commits

Author SHA1 Message Date
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
Laurențiu Nicola
7d815b862f Refactor proxy settings 2021-11-28 10:54:35 +02: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
bors[bot]
2876df147e
Merge #10875
10875: minor: Don't discard flycheck error messages r=Veykril a=Veykril

cc #10793
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-11-27 17:58:28 +00:00
Lukas Wirth
3fcbcf4a0e Don't discard flycheck error messages 2021-11-27 18:57:51 +01:00
bors[bot]
82abe04931
Merge #10874
10874: minor: correct profiling name r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-11-27 16:12:12 +00:00
Aleksey Kladov
ba414bc2ae minor: correct profiling name 2021-11-27 19:11:39 +03:00
bors[bot]
0483774857
Merge #10873
10873: minor: if-let-else to shorter match r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-11-27 15:18:35 +00: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
Laurențiu Nicola
2f5149886d Respect http.proxyStrictSSL 2021-11-27 07:29:44 +02:00
bors[bot]
90c435519d
Merge #10870
10870: ide: fix macro expansion for 'as _' r=Veykril a=jhgg

fixes: #10862

Co-authored-by: Jake Heinz <jh@discordapp.com>
2021-11-27 02:29:54 +00:00
Jake Heinz
dca8f612d0 ide: fix expansion for 'as _' 2021-11-27 02:22:21 +00:00
bors[bot]
9f447ad522
Merge #10865
10865: internal: Use the right `ItemTree` when re-resolving attr r=jonas-schievink a=jonas-schievink

Followup to https://github.com/rust-analyzer/rust-analyzer/pull/10863, which caused a panic when analyzing diesel

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-11-26 02:59:07 +00:00
Jonas Schievink
c291e5e284 Use the right ItemTree when re-resolving attr 2021-11-26 03:57:25 +01:00
bors[bot]
5ea8a9cd20
Merge #10863
10863: internal: build per-block `ItemTree`s r=Veykril a=jonas-schievink

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/7717
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/8911
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/8614

`ItemTree`s are now flat lists of items, so they should probably be renamed at some point.

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-11-26 00:52:02 +00: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
Lukas Wirth
4bf75c5d6e fix: Prioritize tuple fields in highlight_related 2021-11-25 16:34:40 +01:00
bors[bot]
870e730dc8
Merge #10824
10824: project_model: print full cargo command if cargo metadata fails to run r=Veykril a=jhgg

well, `Command` implements a sensible `Debug` which *roughly* does what we want to do. Unfortunately it's got a bit of a quote situation,

So it'd output something like `"cargo" "metadata"  "--format-version" "1" "--features" "foo,bar,baz"`. 

Which although is a bit verbose with the quotes, it's at the very least, not entirely incorrect/misleading.

fixes #10797

Co-authored-by: Jake Heinz <jh@discordapp.com>
2021-11-25 15:12:38 +00:00
bors[bot]
4ca6233bd2
Merge #10847
10847: fix: derive attr path handling in `replace_derive_with_manual_impl` r=rainy-me a=rainy-me

partially fixes #10666

renaming issues mentioned in https://github.com/rust-analyzer/rust-analyzer/issues/10666#issuecomment-955671021 doesn't seem to be fixable at this moment since it's not searchable?(not recorded?) by name.

<del>I'm not sure if it's appropriate to move `parse_comma_sep_paths` function to a method in `ast/node_ext`, maybe `ide_db::helpers` also make sense.</del> put into `ide_db::` instead.

Co-authored-by: rainy-me <github@yue.coffee>
2021-11-24 15:33:00 +00:00
rainy-me
0bb08ccb8f fix: derive path handling 2021-11-25 00:21:29 +09:00
bors[bot]
4a8db6ad66
Merge #10853
10853: fix: Remove possible multiline details in completions r=Veykril a=Veykril

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/10316
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/7531(this has already been fixed prior, from what I've seen)
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-11-24 15:08:44 +00:00
Lukas Wirth
0c98a01b3e Remove possible multiline details in completions 2021-11-24 16:08:11 +01:00
bors[bot]
3e4ac8a2c9
Merge #10846
10846: fix: qualify struct name in struct constructor completion r=Veykril a=andrewleverette

* Alter `add_struct_literal` method signature to take an optional module path
* Update `render_literal` method to use a qualified  

Relates to issue #10771 

Side note: This is my first contribution. Any feedback is welcome!

Co-authored-by: Andrew Leverette <andrewleverette@gmail.com>
2021-11-23 21:22:27 +00:00
bors[bot]
4b1bf5f540
Merge #10849
10849: fix: Disable string highlight injection for macros changing string literals r=Veykril a=Veykril

Fixes #10845
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-11-23 21:13:35 +00:00
Lukas Wirth
f3b25a6fc8 Disable string highlight injection for macros changing string literals 2021-11-23 22:13:10 +01:00
Andrew Leverette
7f15537fa9 Add optimization for not allocating in case of no module path for struct literal 2021-11-23 14:41:31 -06:00
Andrew Leverette
ce7a141110 Add support for qualified struct names 2021-11-23 10:57:29 -06:00
bors[bot]
054873ce15
Merge #10840
10840: fix: Omit generic defaults for types in hover messages r=jonas-schievink a=Veykril

Fixes #9198

We have ranged hovers now which query specifically for the type of an expression/pattern, so if interested in seeing the default, the user can use that functionality instead.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-11-23 15:21:47 +00:00
bors[bot]
1b938ef1ca
Merge #10834
10834: Make lint groups work correctly with `warningsAsInfo` and `warningsAsHint` r=Veykril a=Emilgardis

this change makes it possible to specify

```json
{
   "rust-analyzer.diagnostics.warningsAsInfo": ["unused"],
}
```

to make all lints in the `unused` group show as info, etc.

Co-authored-by: Emil Gardström <emil.gardstrom@gmail.com>
2021-11-22 19:03:07 +00:00
hkalbasi
30ed7fac27 Emit moniker in lsif 2021-11-22 21:29:05 +03:30