Commit Graph

23575 Commits

Author SHA1 Message Date
Amos Wenger
38c98d1ffe Merge commit '26562973b3482a635416b2b663a13016d4d90e20' into HEAD 2022-11-25 13:06:33 +01:00
Amos Wenger
e96c0b1d53 Merge commit 'a2a1d9954' into HEAD 2022-11-25 13:06:31 +01:00
Amos Wenger
d9e16c8289 Merge commit 'd03c1c87d4ca2d524646316387d47b12524ac451' into HEAD 2022-11-25 13:06:03 +01:00
Amos Wenger
ae43043aab Merge commit '79923c382' into HEAD 2022-11-25 13:06:01 +01:00
Amos Wenger
8514f3fe7e Merge commit 'ba28e19b7838e3ad4223ae82d074dc3950ef1548' into HEAD 2022-11-25 13:05:27 +01:00
Amos Wenger
e070dc5129 Merge commit 'c60b1f641' into HEAD 2022-11-25 13:05:26 +01:00
Amos Wenger
682a4de9ab Merge commit '43fb9563b2943d6abc5f3552195f3e27ac618966' into HEAD 2022-11-25 13:04:51 +01:00
Amos Wenger
2f65294569 Merge commit '8807fc4cc' into HEAD 2022-11-25 13:04:50 +01:00
Amos Wenger
2dbda1a6e2 Merge commit '0531aab522f25d6aae30b2cc23a09f4b9257eedc' into HEAD 2022-11-25 13:04:02 +01:00
Amos Wenger
251b18ac6c Merge commit 'a99a48e78' into HEAD 2022-11-25 13:03:59 +01:00
Amos Wenger
299c2938c9 Merge commit '61504c8d951c566eb03037dcb300c96f4bd9a8b6' into HEAD 2022-11-25 13:03:12 +01:00
Amos Wenger
e6540cff74 Merge commit '4f55ebbd4' into HEAD 2022-11-25 13:03:10 +01:00
Amos Wenger
bc9b613808 Merge commit '187bee0bb100111466a3557c20f80defcc0f4db3' into HEAD 2022-11-25 13:02:46 +01:00
Amos Wenger
969e25033b Merge commit 'f5fde4df4' into HEAD 2022-11-25 13:02:44 +01:00
Amos Wenger
b355362380 Merge commit '2e9f1204ca01c3e20898d4a67c8b84899d394a88' into HEAD 2022-11-25 13:02:11 +01:00
Amos Wenger
dec148e6eb Merge commit '459bbb422' into HEAD 2022-11-25 13:02:06 +01:00
Amos Wenger
be2fca97c2 Merge commit '67920f797511c360b25dab4d30730be304848f32' into HEAD 2022-11-25 12:58:20 +01:00
Amos Wenger
318fdacaf8 Merge commit '65e1dc4d9' into HEAD 2022-11-25 12:58:18 +01:00
Amos Wenger
ae878f2708 Merge commit 'e8e598f6415461e7fe957eec1bee6afb55927d59' into HEAD 2022-11-25 12:58:02 +01:00
Amos Wenger
ff2b468b55 Merge commit '3e358a682' into HEAD 2022-11-25 12:58:00 +01:00
Amos Wenger
8117027de6 Merge commit 'a670ff888437f4b6a3d24cc2996e9f969a87cbae' into HEAD 2022-11-25 12:57:43 +01:00
Amos Wenger
6ac43ecf17 Merge commit '31519bb39' into HEAD 2022-11-25 12:57:38 +01:00
Amos Wenger
797ee293ed Merge commit 'b6d59f2bb4fae0ba4f74e2c967b5e2f777f8c860' into HEAD 2022-11-25 12:55:14 +01:00
Amos Wenger
2374c0b368 Merge commit '8231fee46' into HEAD 2022-11-25 12:55:08 +01:00
Amos Wenger
03a723e6bc Merge commit '634cfe3d72e785c843ca5d412b12be137b2e14fb' into HEAD 2022-11-25 12:54:28 +01:00
Amos Wenger
db84a00d03 Merge commit '22c8c9c40' into HEAD 2022-11-25 12:13:34 +01:00
Amos Wenger
2566e06da1 Merge commit '8e38833c3674c1be7d81c6069c62e6ed52b18b27' into HEAD 2022-11-25 12:01:49 +01:00
Laurențiu Nicola
a2a1d99545 ⬆️ rust-analyzer 2022-11-23 17:24:03 +02:00
bors
26562973b3 Auto merge of #13653 - VannTen:fix/doc-typo-vim-lsp, r=Veykril
Fix typo on 'configuration' anchor

https://rust-analyzer.github.io/manual.html#_configuration lands you at
the start of the page, while
https://rust-analyzer.github.io/manual.html#configuration correctly puts
you at the correct anchor
2022-11-20 19:59:43 +00:00
bors
75e1de88f8 Auto merge of #13649 - ZZzzaaKK:master, r=lnicola
Improve grammar of architecture.md

Corrects a few grammar mistakes I found while reading the documentation 😄
2022-11-20 18:31:50 +00:00
Max Gautier
ebbc5492f5 Fix typo on 'configuration' anchor
https://rust-analyzer.github.io/manual.html#_configuration lands you at
the start of the page, while
https://rust-analyzer.github.io/manual.html#configuration correctly puts
you at the correct anchor
2022-11-20 12:47:28 +01:00
ZZzzaaKK
e39d90a8e6 Improve grammar of architecture.md 2022-11-20 01:58:16 +01:00
bors
38fa47fd79 Auto merge of #13290 - poliorcetics:multiple-targets, r=Veykril
Support multiple targets for checkOnSave (in conjunction with cargo 1.64.0+)

This PR adds support for the ability to pass multiple `--target` flags when using
`cargo` 1.64.0+.

## Questions

I needed to change the type of two configurations options, but I did not plurialize the names to
avoid too much churn, should I ?

## Zulip thread

https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer/topic/Issue.2013282.20.28supporting.20multiple.20targets.20with.201.2E64.2B.29

## Example

To see it working, on a macOS machine:

```sh
$ cd /tmp
$ cargo new cargo-multiple-targets-support-ra-test
$ cd !$
$ mkdir .cargo
$ echo '
[build]
target = [
    "aarch64-apple-darwin",
    "x86_64-apple-darwin",
]
' > .cargo/config.toml
$ echo '
fn main() {
    #[cfg(all(target_arch = "aarch64", target_os = "macos"))]
    {
        let a = std::fs::read_to_string("/tmp/test-read");
    }

    #[cfg(all(target_arch = "x86_64", target_os = "macos"))]
    {
        let a = std::fs::read_to_string("/tmp/test-read");
    }

    #[cfg(all(target_arch = "x86_64", target_os = "windows"))]
    {
        let a = std::fs::read_to_string("/tmp/test-read");
    }
}
' > src/main.rs
# launch your favorite editor with the version of RA from this PR
#
# You should see warnings under the first two `let a = ...` but not the third
```

## Screen

![Two panes of a terminal emulator, on the left pane is the main.rs file described above, with warnings for the first two let a = declaration, on the right pane is a display of the .cargo/config.toml, an ls of the current files in the directory and a call to cargo build to show the same warnings as in the editor on the left pane](https://user-images.githubusercontent.com/7951708/192122707-7a00606a-e581-4534-b9d5-b81c92694e8e.png)

Helps with #13282
2022-11-19 13:09:37 +00:00
bors
2d9ed4fd48 Auto merge of #13641 - DesmondWillowbrook:fix-move-format-string, r=Veykril
fix: format expression parsing edge-cases

- Handle positional arguments with formatting options (i.e. `{:b}`). Previously copied `:b` as an argument, producing broken code.

- Handle indexed positional arguments (`{0}`) ([reference](https://doc.rust-lang.org/std/fmt/#positional-parameters)). Previously copied over `0` as an argument.

Note: the assist also breaks when named arguments are used (`"{name}$0", name = 2 + 2` is converted to `"{}"$0, name`. I'm working on fix for that as well.
2022-11-19 12:46:29 +00:00
bors
8050fdb9c7 Auto merge of #13642 - bvanjoi:fix-13292, r=Veykril
fix(assists): remove `item_const` which had default value when implement missing members

Fixed https://github.com/rust-lang/rust-analyzer/issues/13292
2022-11-19 12:33:40 +00:00
bvanjoi
a4f071afd5 fix(assists): remove item_const which had default value when implement missing members` 2022-11-19 19:38:53 +08:00
Kartavya Vashishtha
6d4b2b4b17
run cargo fmt 2022-11-19 15:08:32 +05:30
bors
ac60077ee5 Auto merge of #13639 - Veykril:macro-diags, r=Veykril
fix: Fix proc-macro-srv search paths for Arch Linux

Fixes https://github.com/rust-lang/rust-analyzer/issues/13616
2022-11-19 09:33:10 +00:00
Lukas Wirth
dc8254c6ab fix: Fix nested macro diagnostics pointing at macro expansion files 2022-11-19 10:32:32 +01:00
Kartavya Vashishtha
a3f8fd71df
fix: format expression parsing edge-cases
handle positional arg with formatting

handle indexed positional args
2022-11-19 15:00:25 +05:30
Lukas Wirth
52bc15fc1f fix: Fix proc-macro-srv search paths for Arch Linux 2022-11-18 23:32:26 +01:00
bors
791cb87cdf Auto merge of #13633 - Veykril:vscode-full-diagnostics, r=Veykril
feat: Allow viewing the full compiler diagnostic in a readonly textview

![Code_y1qrash9gg](https://user-images.githubusercontent.com/3757771/202780459-f751f65d-2b1b-4dc3-9685-100d65ebf6a0.gif)

Also adds a VSCode only config that replaces the split diagnostic message with the first relevant part of the diagnostic output

![Code_7k4qsMkx5e](https://user-images.githubusercontent.com/3757771/202780346-cf9137d9-eb77-46b7-aed6-c73a2e41e1c7.png)

This only affects diagnostics generated by primary spans and has no effect on other clients than VSCode.

Fixes https://github.com/rust-lang/rust-analyzer/issues/13574
2022-11-18 19:33:38 +00:00
Lukas Wirth
8452844c26 Fix tests checking the data value 2022-11-18 20:15:49 +01:00
Lukas Wirth
073a63b93e feat: Allow viewing the full compiler diagnostic in a readonly textview 2022-11-18 19:56:08 +01:00
bors
bee27eb471 Auto merge of #13632 - Veykril:scip, r=Veykril
Make it more obvious which SCIP features we do not yet emit in code
2022-11-18 10:31:41 +00:00
Lukas Wirth
656d886ca8 Make it more obvious which SCIP features we do not yet emit in code 2022-11-18 11:31:12 +01:00
bors
e162d5800a Auto merge of #13629 - jonas-schievink:remove-dbg-selection, r=jonas-schievink
feat: Make "Remove dbg!()" assist work on selections

Fixes https://github.com/rust-lang/rust-analyzer/issues/12114
2022-11-17 16:41:51 +00:00
Jonas Schievink
cd6459e7b3 Make "Remove dbg!()" assist work on selections 2022-11-17 17:39:31 +01:00
bors
9cf5c2230d Auto merge of #13625 - lowr:fix/proc-macro-src-test, r=lnicola
internal: Update proc-macro-srv tests

Should have been included in #13548, but I didn't notice as those tests aren't run in our CI.

cc rust-lang/rust#104454
2022-11-16 17:10:59 +00:00
Ryo Yoshida
7577c44c65
Update proc-macro-srv tests 2022-11-17 01:42:56 +09:00