Commit Graph

21587 Commits

Author SHA1 Message Date
Jonas Schievink
f5403aef96 simplify 2022-04-14 13:00:08 +02:00
bors
5620d25972 Auto merge of #11985 - Veykril:config-valid, r=Veykril
minor: Simplify config.rs a bit
2022-04-14 10:16:58 +00:00
Lukas Wirth
d7785a8fab minor: Cleanup config.rs a bit 2022-04-14 12:16:38 +02:00
bors
13f36e7397 Auto merge of #11960 - Veykril:config-valid, r=Veykril
internal: Show more project building errors to the user

Should help out with https://github.com/rust-analyzer/rust-analyzer/issues/9720
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/11223
2022-04-14 09:36:08 +00:00
Lukas Wirth
b23b276310 internal: Show more project building errors to the user 2022-04-14 11:31:01 +02:00
bors
c3e757fe4b Auto merge of #11980 - atouchet:repo, r=Veykril
Update repo URL
2022-04-14 09:26:24 +00:00
bors
cf9c825c9e Auto merge of #11979 - Veykril:ci, r=lnicola
minor: Don't run CI on master branch
2022-04-14 06:36:09 +00:00
Alex Touchet
940ec0967a Update repo URL 2022-04-13 16:54:24 -07:00
bors
15844bf48c Auto merge of #11956 - fee1-dead:master, r=flodiebold
feat: allow customizing the command for running build scripts

I have tested this locally and it fixed #9201 with some small changes on the compiler side with suggestions from https://github.com/rust-analyzer/rust-analyzer/issues/9201#issuecomment-1019554086.

I have also added an environment variable `IS_RA_BUILDSCRIPT_CHECK` for crates to detect that it is a check for buildscripts, and allows defaulting to bogus values for expected environment variables.
2022-04-13 22:53:31 +00:00
Lukas Wirth
baaf18b1e1 minor: Don't run CI on master branch 2022-04-14 00:42:51 +02:00
bors
8ab26f6abc Auto merge of #11976 - Veykril:rust-lang-test, r=Veykril
minor: fix ide docs link

Let's test if bors listens to me here
bors r+
2022-04-13 17:24:18 +00:00
Deadbeef
8b60bf6764 Update CI for Rust bors 2022-04-13 16:55:10 +02:00
Deadbeef
73a033e77c
feat: allow customizing the command for running build scripts 2022-04-13 23:45:51 +10:00
Lukas Wirth
62bf18cba2 minor: fix ide docs link 2022-04-13 13:22:45 +02:00
bors[bot]
ac736dc667
Merge #11974
11974: minor: prepare CI for rust-lang move r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2022-04-13 10:28:45 +00:00
Lukas Wirth
be34896433 minor: prepare CI for rust-lang move 2022-04-13 12:26:24 +02:00
bors[bot]
14c86d5d3c
Merge #11970
11970: Bump chalk r=lnicola a=lnicola

Closes #9990, but not #6418, #10653

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2022-04-12 17:14:16 +00:00
Laurențiu Nicola
5901eddb02 Bump chalk 2022-04-12 20:10:10 +03:00
bors[bot]
7ce2df4b0a
Merge #11969
11969: fix: Add trailing `;` when completing assoc const/type in trait impl r=jonas-schievink a=jonas-schievink

Final item of https://github.com/rust-analyzer/rust-analyzer/issues/11860, thus closes https://github.com/rust-analyzer/rust-analyzer/issues/11860 🎉 

bors r+

Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2022-04-12 16:29:48 +00:00
Jonas Schievink
a182156517 Add trailing ; when completing assoc const/type 2022-04-12 18:28:43 +02:00
bors[bot]
a64a70ebff
Merge #11967
11967: fix: Fix trait impl completions not triggering after `fn`/`const`/`type` r=jonas-schievink a=jonas-schievink

![screenshot-2022-04-12-17:13:01](https://user-images.githubusercontent.com/1786438/162996087-56540f5e-a6be-4111-a4a5-8de21f483a5e.png)

Fixes https://github.com/rust-analyzer/rust-analyzer/issues/11467
cc https://github.com/rust-analyzer/rust-analyzer/issues/11860

bors r+

Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2022-04-12 16:03:12 +00:00
Jonas Schievink
3328a0a11b Fix trait impl completions' lookup_by text 2022-04-12 17:17:31 +02:00
bors[bot]
49847a25ae
Merge #11883
11883: fix(ide): move moudle directory when rename r=rainy-me a=rainy-me

fix: #10992

Added `FileSystemEdit::MoveDir` variant for move dirs. Original implemented as recursively move child mod files but had many issues like

1. left empty dir after rename file
2. only affect rust file
3. not performant

so changed to current version

Co-authored-by: rainy-me <github@yue.coffee>
2022-04-12 15:17:00 +00:00
rainy-me
3dd581b97d fix: move dir on rename mod 2022-04-12 23:01:53 +09:00
bors[bot]
12fb8ab3b2
Merge #11966
11966: minor: simplify r=jonas-schievink a=jonas-schievink

bors r+

Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2022-04-12 13:34:52 +00:00
Jonas Schievink
e66037f139 simplify 2022-04-12 15:34:12 +02:00
bors[bot]
faaec86ff0
Merge #11964
11964: internal: Show more project building errors to the user r=Veykril a=Veykril

Something very fishy is going on with the `rustc_workspace` handling, which caused this bug to only manifest in the `std` library but not other library crate... So there is either a bug there or just the fact that we seem to add duplicate dependencies (I think this is what we are doing with this right?) might be tripping something up somewhere.

cc https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer/topic/Rust-analyzer.20use.20inside.20stdlib

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2022-04-11 22:21:57 +00:00
Lukas Wirth
24af94b474 fix: Unset test feature in rustc source crates 2022-04-12 00:19:40 +02:00
bors[bot]
5d25d24d27
Merge #11961
11961: feature: deprioritize already-imported names in `use` items r=jonas-schievink a=jonas-schievink

![screenshot-2022-04-11-18:48:46](https://user-images.githubusercontent.com/1786438/162790376-6b133925-7cf9-46c5-b0e2-d8c3cba61d47.png)

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

bors r+

Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
2022-04-11 16:50:00 +00:00
Jonas Schievink
63f87ff047 Deprioritize already-imported names 2022-04-11 18:48:27 +02:00
bors[bot]
b1854ceecf
Merge #11958
11958: Show config deseralization failures on start up r=Veykril a=Veykril

We now also show deserialization errors to the user when starting the server.
This PR also adds a small validation "pass" on the config that we will probably populate over time with more checks.

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

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2022-04-11 11:12:55 +00:00
Lukas Wirth
b90df7997d Add simplistic config validation 2022-04-11 13:10:43 +02:00
Lukas Wirth
6d7055e322 Show config deseralization failures on start up 2022-04-11 13:05:34 +02:00
bors[bot]
7a564af989
Merge #11935
11935: feat: Switch to LSP inlay hints r=lnicola a=lnicola



Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2022-04-11 09:29:15 +00:00
bors[bot]
b1c9a6ba64
Merge #11957
11957: fix panic on GAT r=flodiebold a=skyzh

Signed-off-by: Alex Chi <iskyzh@gmail.com>

This is still a workaround on GAT panic, and didn't solve the full problem. But at least we won't panic now. False positive is better than panicking and letting VSCode constantly pop out the warning 🤣

This PR is simple -- only apply the https://github.com/rust-analyzer/rust-analyzer/pull/11878 fix on const generics. For normal GATs, just follow the previous approach.

This PR fixes https://github.com/rust-analyzer/rust-analyzer/issues/11939, I've added it as a test case.

This PR didn't fully fix / https://github.com/rust-analyzer/rust-analyzer/issues/11923. But at least it won't panic now -- will only give a type mismatch error.

Not sure if it fixes / https://github.com/rust-analyzer/rust-analyzer/issues/11921, I'll test it later.

cc `@flodiebold` for review, thanks!

Co-authored-by: Alex Chi <iskyzh@gmail.com>
2022-04-11 08:03:50 +00:00
Alex Chi
51d66714ac fix panic on GAT
Signed-off-by: Alex Chi <iskyzh@gmail.com>
2022-04-11 13:52:02 +08:00
bors[bot]
24cf957627
Merge #11951
11951: minor: Simplify r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2022-04-10 18:21:54 +00:00
Lukas Wirth
7f3572fa0d Simplify 2022-04-10 20:02:06 +02:00
bors[bot]
55d7415ba4
Merge #11955
11955: Fix typo in the manual r=lnicola a=okuramasafumi

The -> There

Co-authored-by: OKURA Masafumi <masafumi.o1988@gmail.com>
2022-04-10 16:28:40 +00:00
OKURA Masafumi
afe1155e64
Fix typo in the manual
The -> There
2022-04-11 01:17:39 +09:00
bors[bot]
7720f163ae
Merge #11954
11954: Parse `for<'a>` closure syntax r=Veykril a=Veykril

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

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2022-04-10 15:59:38 +00:00
Lukas Wirth
d8341c5b92 Parse for<'a> closure syntax 2022-04-10 17:50:14 +02:00
bors[bot]
3b40230a32
Merge #11953
11953: fix: `extract_module` is too eager r=Veykril a=iDawer

Refactored `extract_module`.
Searching for usages and import resolving are done lazily.

Close #11944 

Co-authored-by: iDawer <ilnur.iskhakov.oss@outlook.com>
2022-04-10 13:31:33 +00:00
iDawer
6fff2c1798 extract_module: Refactor loops 2022-04-09 22:07:44 +05:00
iDawer
1e71ac286b extract_module: Resolve imports lazily 2022-04-09 16:52:53 +05:00
iDawer
031bdf2472 Refactor extract_module 2022-04-09 16:52:53 +05:00
iDawer
c2d12906b0 Clean up extract_module 2022-04-09 16:52:40 +05:00
bors[bot]
e691ae0ab2
Merge #11946
11946: internal: Revert #11912 as it parses all visited files r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2022-04-09 11:41:47 +00:00
Lukas Wirth
295f0c57a5 Revert #11912 as it parses all visited files 2022-04-09 13:41:06 +02:00
bors[bot]
9093941ed0
Merge #11943
11943: fix: Don't create `hir::Local`s from const path patterns r=Veykril a=Veykril

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

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2022-04-08 23:09:18 +00:00