Commit graph

22703 commits

Author SHA1 Message Date
Amos Wenger
2566e06da1 Merge commit '8e38833c3674c1be7d81c6069c62e6ed52b18b27' into HEAD 2022-11-25 12:01:49 +01:00
Laurențiu Nicola
9d2cb42a41 ⬆️ rust-analyzer 2022-08-02 09:05:16 +03: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
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
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
Lukas Wirth
74abd44a26 fix: Do completions in path qualifier position 2022-07-28 17:09:31 +02:00
bors
02c240ff81 Auto merge of #12898 - Veykril:compl-pat-brace, r=Veykril
fix: Fix pattern completions adding unnecessary braces

Fixes https://github.com/rust-lang/rust-analyzer/issues/12852
2022-07-28 13:48:12 +00:00
Lukas Wirth
7c59d7c75c fix: Fix pattern completions adding unnecessary braces 2022-07-28 15:47:46 +02:00
bors
02f9ec4be5 Auto merge of #12895 - Veykril:compl-anchor, r=Veykril
fix: Calculate completions after type anchors

Fixes https://github.com/rust-lang/rust-analyzer/issues/12892
2022-07-28 08:06:58 +00:00
Lukas Wirth
e782e59d3d fix: Calculate completions after type anchors 2022-07-28 10:06:36 +02:00
bors
40875353a5 Auto merge of #12891 - brennanvincent:expander_stack, r=lnicola
Use large stack on expander thread

I have verified that this fixes #12884 for me.

Hat tip to `@bjorn3` for identifying the cause of the issue.
2022-07-27 19:40:59 +00:00
Brennan Vincent
f83738e1d9 Use large stack on expander thread 2022-07-27 15:02:34 -04:00
bors
9a1ec451d3 Auto merge of #12890 - Veykril:syntax-blocks, r=Veykril
internal: Assume condition/iterable is missing if there is only a BlockExpr

cc https://github.com/rust-lang/rust-analyzer/pull/12880#issuecomment-1195567103

It sounds good on paper, so let's try it
2022-07-27 15:30:03 +00:00
Lukas Wirth
bf893d59b5 internal: Assume condition/iterable is missing if there is only a BlockExpr 2022-07-27 17:29:51 +02:00
bors
b4d652aa40 Auto merge of #12830 - hi-rustin:rustin-patch-issue-12717-fix, r=Veykril
Find original ast node before compute ref match

ref https://github.com/rust-lang/rust-analyzer/issues/12717
2022-07-27 12:31:26 +00:00
hi-rustin
349dfc7e95 Find original ast node before compute ref match in fn render
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2022-07-27 20:18:00 +08:00
bors
cb32e269df Auto merge of #12887 - Veykril:compl-pref-fix, r=Veykril
fix: Honor ref expressions for compute_ref_match completions

Fixes https://github.com/rust-lang/rust-analyzer/issues/8357
2022-07-27 11:48:55 +00:00
Lukas Wirth
1f8daa180f fix: Honor ref expressions for compute_ref_match completions 2022-07-27 13:48:26 +02:00
bors
8e4d9b84fe Auto merge of #12886 - Veykril:sema-cache, r=Veykril
fix: Fix Semantics::original_ast_node not caching the resulting file
2022-07-27 10:46:20 +00:00
Lukas Wirth
6c379b9f4b fix: Fix Semantics::original_ast_node not caching the resulting file 2022-07-27 12:46:04 +02:00
bors
c2eebd7a50 Auto merge of #12877 - zachs18:inline-def-in-macro, r=zachs18
fix: Insert spaces when inlining a function defined in a macro.

(partially) fixes #12860.

This PR (only) addresses the whitespace issue when inlining functions defined in macros.

Additionally, the indentation/spacing is not ideal, but works, e.g.
```rs
macro_rules! define_function {
    () => { fn test_function_macro() {
        if let Some(3) = 3i32.checked_add(0) {
            println!("3 + 0 == 3");
        }
    } };
}
define_function!();
fn main() {
    test_function_macro();
}
// previously became
// ...
fn main() {
    ifletSome(3)=3i32.checked_add(0){println!("3 + 0 == 3");};
}
// now becomes
// ...
fn main() {
    if let Some(3) = 3i32.checked_add(0){
        println!("3 + 0 == 3");

      };
}
```

The `self` -> `this` problem[^this] is (probably?) a separate problem that I am also looking into.

[^this]: As mentioned in [my comment on the above issue](https://github.com/rust-lang/rust-analyzer/issues/12860#issuecomment-1193231766), inlining a method defined in a macro does not properly replace `self` with the new local `this`.
2022-07-26 16:14:51 +00:00
Zachary S
add33b65dd Remove FIXME comment for unreachable fallback. 2022-07-26 10:59:19 -05:00
bors
7a30f62ecf Auto merge of #12881 - Veykril:proc-srv, r=Veykril
fix: Fix server panicking on project loading when proc-macros are disabled

Fixes https://github.com/rust-lang/rust-analyzer/issues/12879
2022-07-26 14:31:26 +00:00
Lukas Wirth
c8ff70e924 fix: Fix server panicking on project loading when proc-macros are disabled 2022-07-26 16:30:45 +02:00