]>
git.lizzy.rs Git - rust.git/log
bors [Thu, 24 Nov 2022 21:27:32 +0000 (21:27 +0000)]
Auto merge of #13670 - Veykril:derive-helper, r=Veykril
Add `deriveHelper` to `semanticTokenTypes` section of package.json
Lukas Wirth [Thu, 24 Nov 2022 21:26:05 +0000 (22:26 +0100)]
Add deriveHelper to semanticTokenTypes section of package.json
bors [Thu, 24 Nov 2022 21:00:48 +0000 (21:00 +0000)]
Auto merge of #13652 - jhgg:hir-expand/fix-compile-error-expansion, r=Veykril
hir-expand: fix compile_error! expansion not unquoting strings
expanding `compile_error!` would not properly unquote strings, leading to quite ugly diagnostic messages:
![image](https://user-images.githubusercontent.com/
5489149 /
202893481 -
2486ede8 -c79a-4972-9713-
416d6a704064 .png)
this fixes it, using the conveniently placed `unquote_str` function, which now makes errors look like:
![image](https://user-images.githubusercontent.com/
5489149 /
202893466 -
0763efad -9240-4d55-80a6-
6c62000d5d2b .png)
additionally, using `unquote_str` has the cool side-effect of *also* handling raw strings, so this fixes a fixme too!
bors [Thu, 24 Nov 2022 20:44:33 +0000 (20:44 +0000)]
Auto merge of #13592 - MihailMihov:trait_impl_assist, r=Veykril
Add assist to generate trait impl's
resolves #13553
This pull request adds a `generate_trait_impl` assist, which generates trait impl's for a type. It is almost the same as the one to generate impl's and I also reduced the trigger range to only outside the `RecordFieldList`. Also moved all the tests into separate test functions. A few of the old tests seemed redundant, so I didn't port them.
bors [Thu, 24 Nov 2022 20:31:38 +0000 (20:31 +0000)]
Auto merge of #13669 - Veykril:jod-child, r=Veykril
Properly implement Drop for JodGroupChild
Lukas Wirth [Thu, 24 Nov 2022 20:30:15 +0000 (21:30 +0100)]
Properly implement Drop for JodGroupChild
bors [Thu, 24 Nov 2022 15:52:27 +0000 (15:52 +0000)]
Auto merge of #13661 - iredelmeier:fix-null-checkonsave-target, r=jonas-schievink
Fix: Handle empty `checkOnSave/target` values
This fixes a regression introduced by #13290, in which failing to set `checkOnSave/target` (or `checkOnSave/targets`) would lead to an invalid config.
[Fixes #13660]
bors [Thu, 24 Nov 2022 15:16:36 +0000 (15:16 +0000)]
Auto merge of #13576 - Bben01:supress_missing_impl_inside_block, r=jonas-schievink
Suppress "Implement default members" inside contained items
Fixes #13561
bors [Thu, 24 Nov 2022 09:21:44 +0000 (09:21 +0000)]
Auto merge of #13667 - Veykril:detached-files-sysroot, r=Veykril
Handle sysroot config in detached-files workspaces
Lukas Wirth [Thu, 24 Nov 2022 09:21:19 +0000 (10:21 +0100)]
Handle sysroot config in detached-files workspaces
Isobel Redelmeier [Mon, 21 Nov 2022 21:40:32 +0000 (16:40 -0500)]
Fix: Handle empty `checkOnSave/target` values
This fixes a regression introduced by #13290, in which failing to set
`checkOnSave/target` (or `checkOnSave/targets`) would lead to an invalid
config.
Mihail Mihov [Mon, 21 Nov 2022 20:58:01 +0000 (22:58 +0200)]
Combine `generate_impl` and `generate_trait_impl` into a single file
Mihail Mihov [Wed, 9 Nov 2022 22:01:29 +0000 (00:01 +0200)]
Reduce trigger range of `generate_impl` assist and update tests
Mihail Mihov [Wed, 9 Nov 2022 21:43:07 +0000 (23:43 +0200)]
Add assist to generate trait impl's
Bben01 [Mon, 7 Nov 2022 20:31:43 +0000 (22:31 +0200)]
Suppress "Implement default members" inside contained items
bors [Sun, 20 Nov 2022 19:59:43 +0000 (19:59 +0000)]
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
bors [Sun, 20 Nov 2022 18:31:50 +0000 (18:31 +0000)]
Auto merge of #13649 - ZZzzaaKK:master, r=lnicola
Improve grammar of architecture.md
Corrects a few grammar mistakes I found while reading the documentation 😄
Max Gautier [Sun, 20 Nov 2022 11:47:28 +0000 (12:47 +0100)]
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
Jake Heinz [Sun, 20 Nov 2022 08:48:27 +0000 (08:48 +0000)]
hir-expand: fix compile_error! expansion not unquoting strings
ZZzzaaKK [Sun, 20 Nov 2022 00:58:16 +0000 (01:58 +0100)]
Improve grammar of architecture.md
bors [Sat, 19 Nov 2022 13:09:37 +0000 (13:09 +0000)]
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
bors [Sat, 19 Nov 2022 12:46:29 +0000 (12:46 +0000)]
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.
bors [Sat, 19 Nov 2022 12:33:40 +0000 (12:33 +0000)]
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
bvanjoi [Sat, 19 Nov 2022 11:38:53 +0000 (19:38 +0800)]
fix(assists): remove `item_const` which had default value when implement missing members`
Kartavya Vashishtha [Sat, 19 Nov 2022 09:38:32 +0000 (15:08 +0530)]
run cargo fmt
bors [Sat, 19 Nov 2022 09:33:10 +0000 (09:33 +0000)]
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
Lukas Wirth [Sat, 19 Nov 2022 09:32:32 +0000 (10:32 +0100)]
fix: Fix nested macro diagnostics pointing at macro expansion files
Kartavya Vashishtha [Sat, 19 Nov 2022 09:30:25 +0000 (15:00 +0530)]
fix: format expression parsing edge-cases
handle positional arg with formatting
handle indexed positional args
Lukas Wirth [Fri, 18 Nov 2022 22:32:26 +0000 (23:32 +0100)]
fix: Fix proc-macro-srv search paths for Arch Linux
bors [Fri, 18 Nov 2022 19:33:38 +0000 (19:33 +0000)]
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
Lukas Wirth [Fri, 18 Nov 2022 19:11:48 +0000 (20:11 +0100)]
Fix tests checking the data value
Lukas Wirth [Fri, 18 Nov 2022 18:47:45 +0000 (19:47 +0100)]
feat: Allow viewing the full compiler diagnostic in a readonly textview
bors [Fri, 18 Nov 2022 10:31:41 +0000 (10:31 +0000)]
Auto merge of #13632 - Veykril:scip, r=Veykril
Make it more obvious which SCIP features we do not yet emit in code
Lukas Wirth [Fri, 18 Nov 2022 10:31:12 +0000 (11:31 +0100)]
Make it more obvious which SCIP features we do not yet emit in code
bors [Thu, 17 Nov 2022 16:41:51 +0000 (16:41 +0000)]
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
Jonas Schievink [Thu, 17 Nov 2022 16:39:31 +0000 (17:39 +0100)]
Make "Remove dbg!()" assist work on selections
bors [Wed, 16 Nov 2022 17:10:59 +0000 (17:10 +0000)]
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
Ryo Yoshida [Wed, 16 Nov 2022 16:42:56 +0000 (01:42 +0900)]
Update proc-macro-srv tests
bors [Wed, 16 Nov 2022 11:07:18 +0000 (11:07 +0000)]
Auto merge of #13624 - lowr:fix/unsize-array-inference-variable, r=lnicola
fix: resolve inference variable before applying adjustments
Fixes #13619
Ryo Yoshida [Wed, 16 Nov 2022 10:54:07 +0000 (19:54 +0900)]
fix: resolve inference variable before applying adjustments
bors [Tue, 15 Nov 2022 11:59:27 +0000 (11:59 +0000)]
Auto merge of #13615 - mati865:miow-update, r=jonas-schievink
Update several crates to bring support for the new Tier 3 Windows tar…
`cargo t` has passed on Windows 11 with both `x86_64-pc-windows-gnu` and `x86_64-pc-windows-gnullvm` targets.
bors [Tue, 15 Nov 2022 11:45:02 +0000 (11:45 +0000)]
Auto merge of #13623 - jonas-schievink:strip-trait-item-completions, r=jonas-schievink
fix: Strip comments and attributes off of all trait item completions
Previously, this was done in several places redundantly, but not for all items. It was also untested. This PR fixes that.
Jonas Schievink [Tue, 15 Nov 2022 11:41:39 +0000 (12:41 +0100)]
Strip comments and attributes off of all trait item completions
bors [Tue, 15 Nov 2022 11:10:34 +0000 (11:10 +0000)]
Auto merge of #13622 - jonas-schievink:fix-gat-completions, r=jonas-schievink
fix: include generic parameter in GAT completions
Fixes https://github.com/rust-lang/rust-analyzer/issues/13586
Jonas Schievink [Tue, 15 Nov 2022 11:05:11 +0000 (12:05 +0100)]
Fix GAT completion not including generic parameters
Mateusz Mikuła [Sun, 13 Nov 2022 21:23:56 +0000 (22:23 +0100)]
Update several crates to bring support for the new Tier 3 Windows targets
bors [Fri, 11 Nov 2022 15:57:30 +0000 (15:57 +0000)]
Auto merge of #13607 - Veykril:proc-macro-error, r=Veykril
internal: Add version info to unsupported proc macro abi error
cc https://github.com/rust-lang/rust-analyzer/issues/13589#issuecomment-
1311824473
Lukas Wirth [Fri, 11 Nov 2022 15:57:05 +0000 (16:57 +0100)]
internal: Add version info to unsupported proc macro abi error
bors [Fri, 11 Nov 2022 14:26:15 +0000 (14:26 +0000)]
Auto merge of #13606 - Veykril:trait-alias, r=Veykril
fix: Add trait alias grammar to rust.ungram
We already parse them, but the grammar was never updated to reflect that
Lukas Wirth [Fri, 11 Nov 2022 14:25:15 +0000 (15:25 +0100)]
fix: Add trait alias grammar to rust.ungram
bors [Fri, 11 Nov 2022 13:37:27 +0000 (13:37 +0000)]
Auto merge of #13605 - Veykril:empty-ws-error, r=Veykril
fix: Fix r-a eagerly showing no discovered workspace errors
Lukas Wirth [Fri, 11 Nov 2022 13:36:27 +0000 (14:36 +0100)]
fix: Fix r-a eagerly showing no discovered workspace errors
Alexis (Poliorcetics) Bourget [Sat, 24 Sep 2022 23:22:27 +0000 (01:22 +0200)]
feat: Support passing multiple targets to cargo (for Rust 1.64.0+)
Alexis (Poliorcetics) Bourget [Sat, 24 Sep 2022 23:23:20 +0000 (01:23 +0200)]
chore: Align config property
bors [Fri, 11 Nov 2022 12:48:48 +0000 (12:48 +0000)]
Auto merge of #13604 - Veykril:hover-attr, r=Veykril
fix: Fix hover in attributed items not preferring similar kinded tokens
Lukas Wirth [Fri, 11 Nov 2022 12:38:07 +0000 (13:38 +0100)]
fix: Fix hover in attributed items not preferring similar kinded tokens
bors [Fri, 11 Nov 2022 12:32:21 +0000 (12:32 +0000)]
Auto merge of #13602 - lowr:fix/nameres-transitive-visibility, r=Veykril
fix: check visibility of each path segment
Upon path resolution, we have not been checking if every def pointed to by each segment of the path is visible from the original module. This leads to incorrect import resolutions, in particular when one uses glob imports and names collide.
There is decent amount of changes in this PR because:
- some of our tests were not correct in terms of visibility
- I left several basic nameres tests as-is (with expect test updated) since I thought it would be nice to ensure we don't resolve defs that are not visible.
- `fix_visibility` assist relied on `Semantics::resolve_path()`, which uses the name resolution procedure I'm fixing and wouldn't be able to "see through" the items with strict visibility with this patch
The first commit is the gist of the fix itself.
Fixes #10991
Fixes #11473
Fixes #13252
bors [Fri, 11 Nov 2022 12:19:30 +0000 (12:19 +0000)]
Auto merge of #13548 - lowr:fix/tt-punct-spacing, r=Veykril
Fix `tt::Punct`'s spacing calculation
Fixes #13499
We currently set a `tt::Punct`'s spacing to `Spacing::Joint` unless its next token is a trivia (i.e. whitespaces or comment). As I understand it, rustc only [sets `Spacing::Joint` if the next token is an operator](https://github.com/rust-lang/rust/blob/
5b3e9090757da9a95b22f589fe39b6a4b5455b96 /compiler/rustc_parse/src/lexer/tokentrees.rs#L77-L78) and we should follow it to guarantee the consistent behavior of proc macros.
bors [Fri, 11 Nov 2022 12:01:52 +0000 (12:01 +0000)]
Auto merge of #13603 - Veykril:no-workspaces, r=Veykril
fix: Send status notification if there are no found workspaces
Closes https://github.com/rust-lang/rust-analyzer/issues/5829
Lukas Wirth [Fri, 11 Nov 2022 12:00:22 +0000 (13:00 +0100)]
Send status notification if there are no found workspaces
Ryo Yoshida [Fri, 11 Nov 2022 10:59:52 +0000 (19:59 +0900)]
Fix tests that depended on loose visibility restriction
Ryo Yoshida [Fri, 11 Nov 2022 10:56:47 +0000 (19:56 +0900)]
Resolve invisible defs in `fix_visibility` assist
Ryo Yoshida [Fri, 11 Nov 2022 10:50:26 +0000 (19:50 +0900)]
fix: check visibility of each segment in path resolution
Ryo Yoshida [Thu, 10 Nov 2022 10:24:01 +0000 (19:24 +0900)]
Test `TokenTree`s' equality modulo `Punct`s' spacing
Ryo Yoshida [Thu, 10 Nov 2022 10:22:20 +0000 (19:22 +0900)]
Ignore outermost non-delimited `Subtree` when reversing fixups
bors [Wed, 9 Nov 2022 19:51:20 +0000 (19:51 +0000)]
Auto merge of #13590 - Veykril:proc-macro-rustc-src, r=Veykril
internal: Add proc-macro dependency to rustc_private crates
Lukas Wirth [Wed, 9 Nov 2022 19:50:18 +0000 (20:50 +0100)]
Add proc-macro dependency to rustc_private crates
bors [Tue, 8 Nov 2022 17:27:13 +0000 (17:27 +0000)]
Auto merge of #13584 - jonas-schievink:fix-signature-panic, r=jonas-schievink
fix: fix panic when computing signature of generic `FnOnce` callable
Fixes https://github.com/rust-lang/rust-analyzer/issues/13579
Jonas Schievink [Tue, 8 Nov 2022 17:05:07 +0000 (18:05 +0100)]
Don't canonicalize self type when querying FnOnce signature
bors [Tue, 8 Nov 2022 08:44:43 +0000 (08:44 +0000)]
Auto merge of #13582 - lnicola:nest-cargo-toml, r=lnicola
feat: Nest Cargo.lock under Cargo.toml in Code
Closes #13580
Laurențiu Nicola [Tue, 8 Nov 2022 07:57:05 +0000 (09:57 +0200)]
Nest Cargo.lock under Cargo.toml in Code
bors [Tue, 8 Nov 2022 07:38:13 +0000 (07:38 +0000)]
Auto merge of #13581 - Veykril:unit-struct-compl, r=Veykril
fix: Fix item completions not working properly after unit structs and outline modules
Fixes https://github.com/rust-lang/rust-analyzer/issues/13578
Lukas Wirth [Tue, 8 Nov 2022 07:37:45 +0000 (08:37 +0100)]
fix: Fix item completions not working properly after unit structs and outline modules
bors [Mon, 7 Nov 2022 16:45:26 +0000 (16:45 +0000)]
Auto merge of #13573 - Veykril:invalid-file-range, r=Veykril
internal: error instead of panic on invalid file range
Fixes the panic in https://github.com/rust-lang/rust-analyzer/issues/13170
Lukas Wirth [Mon, 7 Nov 2022 16:43:22 +0000 (17:43 +0100)]
internal: error instead of panic on invalid file range
bors [Mon, 7 Nov 2022 16:22:33 +0000 (16:22 +0000)]
Auto merge of #13572 - Veykril:cancellable, r=Veykril
internal: Use Cancellable in favor of Result for clarity
Lukas Wirth [Mon, 7 Nov 2022 16:21:37 +0000 (17:21 +0100)]
internal: Use Cancellable in favor of Result for clarity
bors [Mon, 7 Nov 2022 15:49:54 +0000 (15:49 +0000)]
Auto merge of #13571 - Veykril:unique-references, r=Veykril
minor: Deduplicate reference search results
Fixes https://github.com/rust-lang/rust-analyzer/issues/13407
Lukas Wirth [Mon, 7 Nov 2022 15:48:50 +0000 (16:48 +0100)]
Deduplicate reference search results
bors [Mon, 7 Nov 2022 15:04:40 +0000 (15:04 +0000)]
Auto merge of #13568 - noritada:fix/len-of-byte-string-with-escaped-newlines, r=Veykril
Fix the length displayed for byte string literals with escaped newlines
This is a fix for the problem I reported earlier: "the length of byte strings containing escaped newlines is displayed two bytes longer when the first escaped character is a newline".
I would appreciate it if you could review the fix.
Many thanks.
Closes #13567
bors [Mon, 7 Nov 2022 14:52:05 +0000 (14:52 +0000)]
Auto merge of #13570 - Veykril:dedup-crates-for, r=Veykril
minor: Remove code duplication
Lukas Wirth [Mon, 7 Nov 2022 14:49:26 +0000 (15:49 +0100)]
Remove code duplication
Noritada Kobayashi [Mon, 7 Nov 2022 14:39:02 +0000 (23:39 +0900)]
Add test code for unescaping byte strings
bors [Mon, 7 Nov 2022 14:38:59 +0000 (14:38 +0000)]
Auto merge of #13545 - Veykril:adjustment-hints, r=Veykril
Generalize reborrow hints as adjustment hints
Like reborrow hints, these are still mainly useful for teaching/learning
![image](https://user-images.githubusercontent.com/
3757771 /
200073606 -
b5cd3b95 -a9ad-454d-a3c4-
d4d89bf45928 .png)
bors [Mon, 7 Nov 2022 14:21:31 +0000 (14:21 +0000)]
Auto merge of #13569 - Veykril:rust-version, r=Veykril
Bump Cargo rust-version fields to latest stable
We already depend on `let ... else` now anyways
Closes https://github.com/rust-lang/rust-analyzer/issues/13562
Noritada Kobayashi [Mon, 7 Nov 2022 13:51:29 +0000 (22:51 +0900)]
Clarify the intent
Thanks to Lukas Wirth for a suggestion.
Lukas Wirth [Mon, 7 Nov 2022 11:59:51 +0000 (12:59 +0100)]
Bump Cargo rust-version fields to latest stable
Lukas Wirth [Mon, 7 Nov 2022 11:49:52 +0000 (12:49 +0100)]
Don't trigger adjustment hints in all inlay hint tests
bors [Mon, 7 Nov 2022 11:40:44 +0000 (11:40 +0000)]
Auto merge of #13565 - Veykril:sysroot, r=Veykril
Update sysroot crates
Noritada Kobayashi [Mon, 7 Nov 2022 10:25:07 +0000 (19:25 +0900)]
Fix the length displayed for byte string literals with escaped newlines
The length of byte strings containing escaped newlines is displayed two
bytes longer when the first escaped character is a newline.
This is due to a small bug in handling the first escaped newline in
string literals.
Closes #13567
bors [Mon, 7 Nov 2022 11:07:12 +0000 (11:07 +0000)]
Auto merge of #12991 - TiddoLangerak:extract-method-from-trait-into-impl-root, r=Veykril
Feat: extracted method from trait impl is placed in existing impl
**Before**
https://user-images.githubusercontent.com/
1759192 /
183872883 -
3b0eafd2 -d1dc-440e-9e66-
38e3372f8b64 .mp4
**After**
https://user-images.githubusercontent.com/
1759192 /
183875769 -
87f34c7d -52f0-4dfc-9766-
f591ee738ebb .mp4
Previously, when triggering a method extraction from within an impl trait block, then this would always create a new impl block for
the struct, even if there already is one. Now, if there is already an existing trait-less impl block, then it'll put the extracted method in there.
**Caveats**:
- It currently requires the target impl block to be non-empty. This limitation is because the current architecture takes a `node_to_insert_after` as reference for where to insert the extracted function. An empty impl block doesn't have such a reference node, since it's empty. It seems that supporting this requires a much larger and more complex change.
- This is my first contribution in rust, so apologies for any beginner mistakes.
Lukas Wirth [Mon, 7 Nov 2022 10:45:52 +0000 (11:45 +0100)]
Update sysroot crates
Lukas Wirth [Mon, 7 Nov 2022 10:58:57 +0000 (11:58 +0100)]
rustfmt
bors [Mon, 7 Nov 2022 10:54:38 +0000 (10:54 +0000)]
Auto merge of #13566 - lnicola:therefor, r=lnicola
minor: Fix typos
Laurențiu Nicola [Mon, 7 Nov 2022 10:53:33 +0000 (12:53 +0200)]
Fix typos
bors [Mon, 7 Nov 2022 10:33:13 +0000 (10:33 +0000)]
Auto merge of #13547 - Veykril:line-index, r=Veykril
internal: Optimize `apply_document_changes` a bit
cc https://github.com/rust-lang/rust-analyzer/issues/13538
bors [Mon, 7 Nov 2022 10:19:32 +0000 (10:19 +0000)]
Auto merge of #13552 - Veykril:flycheck-process-group, r=Veykril
internal: Use a process group for flycheck
Should fix https://github.com/rust-lang/rust-analyzer/issues/13348
bors [Sat, 5 Nov 2022 17:57:31 +0000 (17:57 +0000)]
Auto merge of #13556 - pd4d10:patch-1, r=lnicola
docs: fix adoc links
Correct #13536 with adoc link syntax
Rongjian Zhang [Sat, 5 Nov 2022 17:33:57 +0000 (01:33 +0800)]
docs: fix adoc links
Lukas Wirth [Sat, 5 Nov 2022 15:28:04 +0000 (16:28 +0100)]
internal: Use a process group for flycheck