Commit Graph

21860 Commits

Author SHA1 Message Date
Lukas Wirth
4b4a34327e Remove duplicated crate id field from hir::Type 2022-04-15 20:14:35 +02:00
bors
20e6065a7a Auto merge of #12002 - Veykril:proc-macro-change-panic, r=Veykril
fix: Fix source root panic in global state when checking out older git revs

Fixes https://github.com/rust-lang/rust-analyzer/issues/11357
2022-04-15 18:02:40 +00:00
Lukas Wirth
f540d1c2aa fix: Fix source root panic in global state when checking out older git revs 2022-04-15 20:02:15 +02:00
bors
a912f2a9f6 Auto merge of #12001 - Veykril:refs, r=Veykril
fix: Do reference search on all downmapped tokens with the same kind only

cc https://github.com/rust-lang/rust-analyzer/issues/11668
2022-04-15 17:43:24 +00:00
Lukas Wirth
58660dee2a fix: Do reference search on all downmapped tokens with the same kind only 2022-04-15 19:42:48 +02:00
bors
5e41205e9c Auto merge of #12000 - Veykril:hlmac, r=Veykril
fix: Tag `macro_rules` macro bang with `MacroBang` tag

cc https://github.com/rust-lang/rust-analyzer/issues/11996
2022-04-15 17:19:33 +00:00
Lukas Wirth
be27efabfa fix: Tag macro_rules macro bang with MacroBang tag 2022-04-15 19:16:18 +02:00
bors
a860857760 Auto merge of #11999 - Veykril:config-valid, r=Veykril
Update feature listing in extension README
2022-04-15 17:12:26 +00:00
Lukas Wirth
77a9d951bd Update feature listing in extension README 2022-04-15 19:11:56 +02:00
Laurențiu Nicola
1698afc05d Bump target JS version 2022-04-15 18:18:18 +03:00
bors
7ce3ca5aab Auto merge of #11993 - jonas-schievink:adt-completions-in-block, r=jonas-schievink
fix: enable ADT keyword completions in block expressions

fixes https://github.com/rust-lang/rust-analyzer/issues/11576
2022-04-14 16:40:15 +00:00
Jonas Schievink
1fd232cd69 Enable ADT keyword completions in block expression 2022-04-14 18:39:27 +02:00
bors
ae68b68d39 Auto merge of #11992 - jonas-schievink:unresolved-primitive-module-fallback, r=jonas-schievink
fix: resolve `uN::method` even when `use std::uN;` is present

Closes https://github.com/rust-analyzer/rust-analyzer/issues/6082
2022-04-14 13:53:18 +00:00
Jonas Schievink
d764e134d5 Fallback to primitive when path doesn't resolve 2022-04-14 15:51:38 +02:00
bors
63573d47aa Auto merge of #11971 - jonas-schievink:on-type-fmt-assignments, r=jonas-schievink
feat: Add trailing `;` when typing `=` in assignment

![Peek 2022-04-12 19-41](https://user-images.githubusercontent.com/1786438/163022079-1ed114ef-7c75-490f-a8ed-731a13f0b44d.gif)

This does have a false positive to keep in mind, it will add a trailing `;` in the following snippet too, which is probably not desired:

```rust
fn is_zero(i: i32) -> bool {
    i $0 0
}
```

However, that function is unlikely to be written from the "inside out" like that, so it might be acceptable. Typically `=` is only inserted last when the author realizes that an existing expression should be assigned to some variable.
2022-04-14 12:36:17 +00:00
bors
1b15638b4d Auto merge of #11990 - jonas-schievink:improve-itemtree-prettyprint, r=jonas-schievink
internal: Improve ItemTree pretty print output

Expand `FnFlags` into what they actually mean and omit `AttrId`s, since those are sequential numbers in the item tree
2022-04-14 12:28:01 +00:00
Jonas Schievink
fbded178fa Improve ItemTree pretty print output 2022-04-14 14:24:27 +02:00
Jonas Schievink
f96fd40104 add docs 2022-04-14 13:23:19 +02:00
bors
4cee507d28 Auto merge of #11988 - jonas-schievink:expand-glob, r=jonas-schievink
minor: reenable simplify glob import test
2022-04-14 11:03:02 +00:00
Jonas Schievink
72dcfe6cc6 reenable test 2022-04-14 13:02:20 +02:00
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
Jonas Schievink
99e9e52fbc Remove trailing ; when turning assignment into == comparison 2022-04-13 16:01:09 +02:00
Jonas Schievink
b9dd7db817 Add more no-op tests 2022-04-13 15:47:33 +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
Jonas Schievink
cde2a1de36 Add trailing ; when typing = in assignment 2022-04-12 19:39:19 +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