Commit Graph

23076 Commits

Author SHA1 Message Date
fprasx
5cb3e7a41b Added fixup for match statements w/ missing parts
Passes tests
2022-08-03 15:59:17 -04:00
bors
4904b2bdf8 Auto merge of #12934 - Veykril:typing, r=Veykril
Add a setting to disable comment continuation in VSCode

Fixes https://github.com/rust-lang/rust-analyzer/issues/12928
2022-08-03 16:23:49 +00:00
Lukas Wirth
46d6357994 Add a setting to disable comment continuation in VSCode 2022-08-03 18:22:45 +02:00
bors
2bc9a2d9e0 Auto merge of #12933 - Veykril:proc-ignored, r=Veykril
Use an empty expander for ignored non-attribute proc-macros

Identity is the wrong behaviour for anything that's not an attribute here
2022-08-03 16:11:08 +00:00
Lukas Wirth
a8a6c160be Use an empty expander for ignored non-attribute proc-macros 2022-08-03 18:10:15 +02:00
oxalica
10f870eff4 Impl entry-API for la_arena::ArenaMap
We enforce integral and `Copy` key, so some key-related functions are
not necessary since user can just reuse the index for the `entry` call.
2022-08-03 18:31:52 +08:00
oxalica
c203ac2cf5 Add more constructors for la-arena 2022-08-03 17:44:06 +08:00
bors
a02b042ae7 Auto merge of #12930 - lnicola:subtree-branch, r=lnicola
minor: Use the release branch in xtask promote
2022-08-03 06:49:13 +00:00
Laurențiu Nicola
9a447c04f6 Use the release branch in xtask promote 2022-08-03 09:48:44 +03:00
bors
1c03f45c08 Auto merge of #12837 - DorianListens:dscheidt/generate-enum-data, r=Veykril
feat: support associated values in "Generate Enum Variant" assist

This change adds support for associated values to the "Generate Enum Variant" assist.

I've split the implementation out into 4 steps to make code review easier:
- Add "add_variant" support to the structural ast editing system in `edit_in_place`
- Migrate `generate_enum_variant` to use structural ast editing instead of string manipulation
- Support tuple fields
- Support record fields

Please let me know if I should leave the commits as-is, or squash before merging.

Fixes #12797
2022-08-02 19:50:01 +00:00
Dorian Scheidt
1980c1192c Support PathPat paths in generate_enum_variant 2022-08-02 14:37:12 -04:00
Dorian Scheidt
111694d85b Be more strict about supported Paths in generate_enum_variant
PathType path parents don't support this assist
2022-08-02 14:37:12 -04:00
Dorian Scheidt
e4638def7a Support record fields in generate_enum_variant 2022-08-02 14:37:12 -04:00
Dorian Scheidt
15d8049fa9 Support tuple fields in generate_enum_variant 2022-08-02 14:37:12 -04:00
Dorian Scheidt
bea1fec7a2 convert generate_enum_variant to use add_variant 2022-08-02 14:37:12 -04:00
Dorian Scheidt
405dd77d30 Support adding variants via structural editing 2022-08-02 14:37:12 -04:00
bors
113f1dbc91 Auto merge of #12880 - palango:while-fixup, r=Veykril
Add syntax fixup for while loops

Part of https://github.com/rust-lang/rust-analyzer/issues/12777

This is a first iteration to gather some feedback. In particular I'm not sure if the curly braces should be added here, but I couldn't get the test to work without them. Any hints welcome!
2022-08-02 14:08:56 +00:00
bors
c6c0ac2645 Auto merge of #12919 - jonas-schievink:speling, r=jonas-schievink
fix: Fix r-a spelling in some places

User-facing change: All commands are now rendered as "rust-analyzer: Command" rather than "Rust Analyzer: Command".

Alternative to https://github.com/rust-lang/rust-analyzer/pull/12910

Potentially controversial, since other extensions don't do this, so I won't self-approve.
2022-08-02 13:10:12 +00:00
bors
8e38833c36 Auto merge of #12920 - jonas-schievink:arm-release, r=jonas-schievink
feat: Publish extension for 32-bit ARM systems
2022-08-01 14:17:53 +00:00
Jonas Schievink
c71f1e70a8 Don't run on PRs 2022-08-01 16:16:22 +02:00
Laurențiu Nicola
cfbada4e0f Upload arm-unknown-linux-gnueabihf build artifact 2022-08-01 16:54:54 +03:00
Laurențiu Nicola
b72ff95901
Fix linker env var name 2022-08-01 16:46:18 +03:00
Jonas Schievink
64090ee27c Fix target check 2022-08-01 15:22:02 +02:00
Jonas Schievink
caf8a6454a Set linker 2022-08-01 15:09:45 +02:00
Jonas Schievink
9c960731de Publish extension for 32-bit ARM systems 2022-08-01 14:26:20 +02:00
Jonas Schievink
bd7dfac5eb Fix r-a spelling in some places 2022-08-01 13:47:09 +02:00
bors
5edbdd127a Auto merge of #12918 - lowr:fix/doctest-names, r=Veykril
fix: remove whitespaces from doctest names

When rustdoc runs doctests, it removes whitespaces from the tests' path ([code](25bb1c13bd/src/librustdoc/doctest.rs (L951))). See https://github.com/rust-lang/rust/pull/89422 for details.

Interestingly enough, "Run doctest" has been working without much problem even though rust-analyzer hasn't followed the change. This is because cargo passes the test name to rustdoc via `--test-args` option, and then rustdoc [splits it by whitespace](25bb1c13bd/src/librustdoc/config.rs (L513-L514)); the last element of the split test name **always** matches the test name that rustdoc generates.

However, it may run other tests unexpectedly (to be precise, this has long since been a thing because of the split). Consider the following example:

```rust
struct A<T, U>(T, U);
struct B<T, U>(T, U);
/// ```
/// doctest here
/// ```
impl<T, U> A<T, U> {}
/// ```
/// doctest here
/// ```
impl<T, U> B<T, U> {}
```

When you "Run doctest" either of the two, rustdoc considers "U>" one of the test specs and both doctests are run. This patch fixes it by following rustdoc and removing the whitespace from the doctests' name.
2022-08-01 10:12:59 +00:00
Ryo Yoshida
d40ab66186
fix: remove whitespaces from doctest names 2022-08-01 17:57:47 +09:00
bors
2b472f6684 Auto merge of #12915 - lnicola:promote-subtree, r=lnicola
internal: Update `xtask promote` and release instructions

Update `xtask` for the subtree workflow. This doesn't explain how to do a `rust -> RA`  sync, since that's definitely more involved, but will probably only happen rarely.
2022-07-31 17:58:40 +00:00
bors
af646621de Auto merge of #12916 - Veykril:nits, r=Veykril
minor: Properly cfg the `max` field of Limit
2022-07-31 17:42:10 +00:00
Lukas Wirth
3b2ecf44a0 Give variables more descriptive names 2022-07-31 19:27:34 +02:00
Lukas Wirth
d31f3605ce Properly cfg the max field of Limit 2022-07-31 19:27:20 +02:00
Laurențiu Nicola
58c3a5634f Update xtask promote and release instructions 2022-07-31 20:26:35 +03:00
bors
e0ff4befda Auto merge of #12913 - Veykril:attr-merge, r=Veykril
fix: Fix ast-id up when merging raw attributes

Fixes https://github.com/rust-lang/rust-analyzer/issues/12912
2022-07-30 07:53:48 +00:00
Lukas Wirth
618cfd792c fix: Fix ast-id up when merging raw attributes 2022-07-30 09:43:30 +02:00
bors
fb5e49631b Auto merge of #12906 - cynecx:fix-completions, r=Veykril
fix: complete path of existing record expr
2022-07-29 15:41:36 +00:00
hkalbasi
c1a175f61e Generate rust type from json 2022-07-29 20:06:01 +04:30
cynecx
902fd6ddcd fix: complete path of existing record expr 2022-07-29 17:24:05 +02:00
bors
ec3586eab9 Auto merge of #12904 - lnicola:completion-builtin-filter, r=lnicola
internal: Be more explicit when filtering built-in completions

We return every built-in type here, but only have `u32` in the tests, so let's look for that one to make tests more reliable across platforms.
2022-07-28 18:52:00 +00:00
Laurențiu Nicola
11ef494b37 Be more explicit when filtering built-in completions 2022-07-28 21:45:47 +03:00
hkalbasi
61d1c3e138 add debug impl for AnyDiagnostic 2022-07-28 22:38:20 +04:30
bors
cab1055430 Auto merge of #12903 - lnicola:rainbows, r=Veykril
Only run rainbow highlighting test on 64-bit Unix
2022-07-28 18:08:09 +00:00
Laurențiu Nicola
948c9afc73 Only run rainbow highlighting test on 64-bit Unix 2022-07-28 21:03:59 +03:00
bors
b8763fe224 Auto merge of #12902 - Veykril:item-scope, r=Veykril
fix: Order ItemScope::entries results
2022-07-28 17:38:59 +00:00
Lukas Wirth
f867ddc621 fix: Order ItemScope::entries results 2022-07-28 19:28:56 +02:00
bors
32e640e2ba Auto merge of #12901 - Veykril:completion-trait-expr, r=Veykril
fix: Don't complete marker traits in expression position

cc https://github.com/rust-lang/rust-analyzer/issues/12196
2022-07-28 15:51:30 +00:00
Lukas Wirth
ce7541260d fix: Don't complete marker traits in expression position 2022-07-28 17:50:49 +02:00
bors
af2b806c1c Auto merge of #12900 - pksunkara:master, r=lnicola
publish: Use cargo ws rename to rename crates

Follow up for #12716
2022-07-28 15:25:07 +00:00
Pavan Kumar Sunkara
8658425a67 publish: Use cargo ws rename to rename crates 2022-07-28 16:21:14 +01:00
bors
5986d2190f Auto merge of #12899 - Veykril:compl-qualifier, r=Veykril
fix: Do completions in path qualifier position

Fixes https://github.com/rust-lang/rust-analyzer/issues/12566

Not too happy with the duplication needed for this, but it is what it is. Completions in path qualifiers will have to be filtered properly still, but its better to show too many completions for this than too few for now.
2022-07-28 15:11:24 +00:00