Commit Graph

22731 Commits

Author SHA1 Message Date
Lukas Wirth
d6e78b04d0 feat: Handle operators like their trait functions in the IDE 2022-08-05 14:16:36 +02:00
bors
cb52271701 Auto merge of #12946 - rust-lang:issue-template, r=lnicola
Update bug_report.md

Closes https://github.com/rust-lang/rust-analyzer/issues/12944
2022-08-05 07:09:34 +00:00
Lukas Wirth
d94a42d652
Update bug_report.md 2022-08-05 09:04:27 +02:00
Lukas Wirth
30c4f9fa7d
Update bug_report.md 2022-08-05 08:42:13 +02:00
bors
0fe3bcfd35 Auto merge of #12808 - Veykril:check-workspace, r=Veykril
feat: Only flycheck workspace that belongs to saved file

Supercedes https://github.com/rust-lang/rust-analyzer/pull/11038

There is still the problem that all the diagnostics are cleared, only clearing diagnostics of the relevant workspace isn't easily doable though I think, will have to dig into that
2022-08-04 12:57:04 +00:00
Lukas Wirth
df7f755e3b Don't flycheck while the workspace is being loaded 2022-08-04 14:56:44 +02:00
bors
c6a9fbfd00 Auto merge of #12939 - jean-santos:errors-ide-hover-wrong-place, r=Veykril
Error Diagnostics appear in the wrong place

Fix #12436
2022-08-04 12:42:51 +00:00
Jean santos
5698e51027 tidy formatting 2022-08-04 09:28:34 -03:00
Lukas Wirth
df9d3db82f Trigger flycheck on all transitive dependencies as well 2022-08-04 13:22:15 +02:00
Jean santos
49dac4070c on hover fallback error, adds ast::type as possible node 2022-08-03 17:37:11 -03: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
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
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
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