]>
git.lizzy.rs Git - rust.git/log
Florian Diebold [Sun, 20 Mar 2022 23:08:12 +0000 (00:08 +0100)]
Cleanups
Florian Diebold [Sun, 20 Mar 2022 23:05:52 +0000 (00:05 +0100)]
Remove old diagnostics
Florian Diebold [Sun, 20 Mar 2022 23:04:15 +0000 (00:04 +0100)]
Add 'remove this semicolon'
Florian Diebold [Sun, 20 Mar 2022 18:20:16 +0000 (19:20 +0100)]
Add "add missing Ok/Some" fix
Florian Diebold [Sun, 20 Mar 2022 15:26:48 +0000 (16:26 +0100)]
Add new type-mismatch diagnostic
Florian Diebold [Sun, 20 Mar 2022 15:19:02 +0000 (16:19 +0100)]
Expose coercion logic in hir API
Florian Diebold [Sun, 20 Mar 2022 12:42:47 +0000 (13:42 +0100)]
Extract coercion logic to InferenceTable
To make it accessible without an InferenceContext.
bors[bot] [Mon, 21 Mar 2022 09:04:40 +0000 (09:04 +0000)]
Merge #11776
11776: Replace write! with direct `Formatter` calls r=Veykril a=lnicola
The final executable is somehow larger (36 239 296 vs 36 238 336 bytes), but this saves us a bit of `text` and `data`:
```
text data bss dec hex filename
23719199 1126625 4377
24850201 17b2f19 rust-analyzer-baseline
23716027 1126377 4377
24846781 17b21bd rust-analyzer-pr
```
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Laurențiu Nicola [Mon, 21 Mar 2022 08:43:36 +0000 (10:43 +0200)]
Replace write! with direct calls
bors[bot] [Sun, 20 Mar 2022 21:15:49 +0000 (21:15 +0000)]
Merge #11690
11690: feat: Add an assist for inlining type aliases r=Veykril a=steven-joruk
I'm working towards implementing #10881, but I'd like to get this in first with earlier feedback.
Is `inline_type_alias` a good enough name? I guess the follow up assist would be called `inline_type_alias_into_all_users` based on that.
![valid_inlines](https://user-images.githubusercontent.com/
1277939 /
158020510 -
fed78b5c -4c7e-46d1-9151-
3044a29b9990 .gif)
![invalid_inlines](https://user-images.githubusercontent.com/
1277939 /
158020516 -
8a2deb6d -c6ec-4adf-a15b-
c514fc97dc43 .gif)
Co-authored-by: Steven Joruk <steven@joruk.com>
Steven Joruk [Sun, 20 Mar 2022 20:53:03 +0000 (20:53 +0000)]
refactor: Do more work in inline_type_alias closure
bors[bot] [Sun, 20 Mar 2022 18:31:27 +0000 (18:31 +0000)]
Merge #11775
11775: internal: Treat `global_asm` and `asm` macros as unsafe r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Sun, 20 Mar 2022 18:27:46 +0000 (19:27 +0100)]
internal: Treat {global_}asm macros as unsafe
bors[bot] [Sun, 20 Mar 2022 18:15:29 +0000 (18:15 +0000)]
Merge #11774
11774: feat: Tag macro calls as unsafe if they expand to unsafe expressions r=Veykril a=Veykril
as long as they aren't inside an unsafe block inside the macro that is.
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Sun, 20 Mar 2022 18:13:50 +0000 (19:13 +0100)]
Simplify
Lukas Wirth [Sun, 20 Mar 2022 18:07:44 +0000 (19:07 +0100)]
feat: Tag macro calls as unsafe if they expand to unsafe expressions
bors[bot] [Sun, 20 Mar 2022 13:47:16 +0000 (13:47 +0000)]
Merge #11771
11771: feat: Visualize compiler inserted reborrows via inlay hints r=Veykril a=Veykril
Disabled by default.
![image](https://user-images.githubusercontent.com/
3757771 /
159165178 -
baaf968a -4381-468e-933f-
5326ca1b203d .png)
Closes https://github.com/rust-analyzer/rust-analyzer/issues/11275
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Sun, 20 Mar 2022 13:41:27 +0000 (14:41 +0100)]
Update inlay hint feature docs
Lukas Wirth [Sun, 20 Mar 2022 13:38:16 +0000 (14:38 +0100)]
feat: Visualize compiler inserted reborrows via inlay hints
bors[bot] [Sat, 19 Mar 2022 19:26:34 +0000 (19:26 +0000)]
Merge #11765
11765: fix: Fix closure hints using macro ranges r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Sat, 19 Mar 2022 19:24:09 +0000 (20:24 +0100)]
fix: Fix closure hints using macro ranges
bors[bot] [Sat, 19 Mar 2022 19:15:06 +0000 (19:15 +0000)]
Merge #11755
11755: feat: Implement lifetime elision hints r=Veykril a=Veykril
With names on:
![Code_erl26zKvuf](https://user-images.githubusercontent.com/
3757771 /
159134856 -
e2c75d2d -f17c-45c7-9a78-
3da5ee8b1acd .png)
With names off:
![Code_MRP1Pbfe9d](https://user-images.githubusercontent.com/
3757771 /
159134857 -
30fac3a1 -825e-4f49-ba9b-
9fa0bb215694 .png)
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Sat, 19 Mar 2022 19:12:14 +0000 (20:12 +0100)]
Change skip trivial behaviour
Lukas Wirth [Sat, 19 Mar 2022 18:01:19 +0000 (19:01 +0100)]
Add option to skip trivial cases
Lukas Wirth [Sat, 19 Mar 2022 17:11:56 +0000 (18:11 +0100)]
Use numbers for lifetimes by default, add setting to prefer using parameter names
bors[bot] [Fri, 18 Mar 2022 19:30:52 +0000 (19:30 +0000)]
Merge #11761
11761: internal: Rename call info to "signature help" r=jonas-schievink a=jonas-schievink
It is no longer limited to just calls
bors r+
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
Jonas Schievink [Fri, 18 Mar 2022 19:19:35 +0000 (20:19 +0100)]
Rename call info to "signature help"
It is no longer limited to just calls
bors[bot] [Fri, 18 Mar 2022 19:01:25 +0000 (19:01 +0000)]
Merge #11760
11760: feat: Provide signature help when editing generic args r=jonas-schievink a=jonas-schievink
![screenshot-2022-03-18-19:48:14](https://user-images.githubusercontent.com/
1786438 /
159067106 -
3917a355 -ca77-4d23-ad56-
945dcc945425 .png)
bors r+
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
Jonas Schievink [Fri, 18 Mar 2022 18:56:34 +0000 (19:56 +0100)]
Provide signature help when editing generic args
Lukas Wirth [Fri, 18 Mar 2022 17:57:11 +0000 (18:57 +0100)]
Fix test fixtures
Lukas Wirth [Fri, 18 Mar 2022 17:55:03 +0000 (18:55 +0100)]
Give the lifetimes better names
Lukas Wirth [Fri, 18 Mar 2022 17:11:16 +0000 (18:11 +0100)]
feat: Implement lifetime elision hints
bors[bot] [Fri, 18 Mar 2022 16:38:32 +0000 (16:38 +0000)]
Merge #11752
11752: internal: Allow explicitly specifying end of fixture annotation r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Fri, 18 Mar 2022 14:30:58 +0000 (15:30 +0100)]
internal: Allow explicitly specifying end of fixture annotation
bors[bot] [Fri, 18 Mar 2022 14:37:59 +0000 (14:37 +0000)]
Merge #11753
11753: feat: Complete assoc const patterns on builtin types r=jonas-schievink a=jonas-schievink
followup to https://github.com/rust-analyzer/rust-analyzer/pull/11713
bors r+
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
Jonas Schievink [Fri, 18 Mar 2022 14:34:31 +0000 (15:34 +0100)]
Complete assoc const patterns on builtin types
bors[bot] [Fri, 18 Mar 2022 13:54:09 +0000 (13:54 +0000)]
Merge #11713
11713: Complete associated consts in patterns r=jonas-schievink a=hi-rustin
Try close https://github.com/rust-analyzer/rust-analyzer/issues/11555
Co-authored-by: hi-rustin <rustin.liu@gmail.com>
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
Jonas Schievink [Fri, 18 Mar 2022 13:53:44 +0000 (14:53 +0100)]
Update crates/ide_completion/src/tests/pattern.rs
bors[bot] [Fri, 18 Mar 2022 11:13:37 +0000 (11:13 +0000)]
Merge #11750
11750: fix: Fix runnables trying to add doc tests in the crate root from #[macro_export] macros r=Veykril a=Veykril
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/11746
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Fri, 18 Mar 2022 10:55:53 +0000 (11:55 +0100)]
fix: Fix runnables trying to add doc tests in the crate root from #[macro_export] macros
bors[bot] [Fri, 18 Mar 2022 07:19:42 +0000 (07:19 +0000)]
Merge #11747
11747: minor: Remove Update GitHub API token command r=lnicola a=lnicola
bors r+
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Laurențiu Nicola [Fri, 18 Mar 2022 07:19:02 +0000 (09:19 +0200)]
Remove Update GitHub API token command
bors[bot] [Thu, 17 Mar 2022 17:25:07 +0000 (17:25 +0000)]
Merge #11744
11744: Bump deps r=lnicola a=lnicola
bors r+
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Laurențiu Nicola [Thu, 17 Mar 2022 17:10:45 +0000 (19:10 +0200)]
Bump deps
bors[bot] [Thu, 17 Mar 2022 16:28:21 +0000 (16:28 +0000)]
Merge #11743
11743: fix: Properly unify receivers during method resolution r=flodiebold a=flodiebold
This fixes our type inference problems with `DynMap`; the problem there were the projection types in
```rust
impl<P: Policy> KeyMap<Key<P::K, P::V, P>>
```
which messed up the naive type equality check we did. It also actually simplifies the logic though, IMO. I also added a fix for associated const resolution that I noticed (visibility not being taken into account).
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
Florian Diebold [Thu, 17 Mar 2022 16:08:43 +0000 (17:08 +0100)]
Move fallback_bound_vars to the only place it's used now
Florian Diebold [Thu, 17 Mar 2022 16:02:58 +0000 (17:02 +0100)]
Fixes for consts
Florian Diebold [Thu, 17 Mar 2022 13:29:39 +0000 (14:29 +0100)]
Snapshot obligations
Florian Diebold [Thu, 17 Mar 2022 11:39:42 +0000 (12:39 +0100)]
Properly try unifying the receivers during method resolution
Instead of hackily checking if they're equal.
hi-rustin [Thu, 17 Mar 2022 14:59:47 +0000 (22:59 +0800)]
Fix typo
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
Florian Diebold [Sun, 13 Mar 2022 15:25:03 +0000 (16:25 +0100)]
Add test for DynMap type inference
hi-rustin [Thu, 17 Mar 2022 13:18:52 +0000 (21:18 +0800)]
Match the enum and union
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
bors[bot] [Thu, 17 Mar 2022 13:23:22 +0000 (13:23 +0000)]
Merge #11741
11741: Emit #[must_use] in Generate enum is_variant assist r=lnicola a=lnicola
bors r+
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
bors[bot] [Thu, 17 Mar 2022 13:14:26 +0000 (13:14 +0000)]
Merge #11740
11740: Insert #[must_use] in generate_is_empty_from_len r=lnicola a=Walther
Inserts `#[must_use]` for the generated `is_empty` methods. I also added the `#[must_use]` for the `len()` methods in the documentation examples and tests for this generator while at it, to make sure they too encourage the use of the annotation.
From discussion in https://github.com/rust-analyzer/rust-analyzer/issues/11736 and https://github.com/rust-analyzer/rust-analyzer/pull/11738
Co-authored-by: Walther <veeti.haapsamo@gmail.com>
Laurențiu Nicola [Thu, 17 Mar 2022 13:10:25 +0000 (15:10 +0200)]
Emit #[must_use] in Generate enum is_variant assist
Walther [Thu, 17 Mar 2022 13:03:02 +0000 (15:03 +0200)]
Insert #[must_use] in generate_is_empty_from_len
bors[bot] [Thu, 17 Mar 2022 12:58:14 +0000 (12:58 +0000)]
Merge #11737 #11739
11737: Emit `#[must_use]` in `Generate new` assist r=lnicola a=lnicola
Closes #11736
11739: Insert #[must_use] in generate_getter r=lnicola a=Walther
Inserts `#[must_use]` for the generated getter methods.
From discussion in https://github.com/rust-analyzer/rust-analyzer/issues/11736 and https://github.com/rust-analyzer/rust-analyzer/pull/11738
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Co-authored-by: Walther <veeti.haapsamo@gmail.com>
Walther [Thu, 17 Mar 2022 12:49:22 +0000 (14:49 +0200)]
Insert #[must_use] in generate_getter
hi-rustin [Wed, 16 Mar 2022 12:54:01 +0000 (20:54 +0800)]
Fix the wrong path resolution
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
hi-rustin [Tue, 15 Mar 2022 13:54:45 +0000 (21:54 +0800)]
Add completes_associated_const test
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
hi-rustin [Tue, 15 Mar 2022 13:14:02 +0000 (21:14 +0800)]
Complete associated consts in patterns
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
Laurențiu Nicola [Thu, 17 Mar 2022 12:11:29 +0000 (14:11 +0200)]
Emit #[must_use] in Generate new assist
bors[bot] [Thu, 17 Mar 2022 09:23:26 +0000 (09:23 +0000)]
Merge #11735
11735: Fix const generic panic, again r=lnicola a=HKalbasi
fix https://github.com/rust-analyzer/rust-analyzer/pull/11734#issuecomment-
1070526085
Co-authored-by: hkalbasi <hamidrezakalbasi@protonmail.com>
hkalbasi [Thu, 17 Mar 2022 09:15:04 +0000 (12:45 +0330)]
fix regression_11688_2
bors[bot] [Thu, 17 Mar 2022 06:54:27 +0000 (06:54 +0000)]
Merge #11734
11734: internal: Bump `xshell` and fix `dist` r=lnicola a=lnicola
bors r+
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Laurențiu Nicola [Thu, 17 Mar 2022 06:53:33 +0000 (08:53 +0200)]
Bump xshell and fix dist
bors[bot] [Wed, 16 Mar 2022 20:31:47 +0000 (20:31 +0000)]
Merge #11731
11731: feat: Add return type hints for closures with block bodies r=Veykril a=Veykril
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/11386
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Wed, 16 Mar 2022 20:16:55 +0000 (21:16 +0100)]
feat: Add return type hints for closures with block bodies
bors[bot] [Wed, 16 Mar 2022 19:56:31 +0000 (19:56 +0000)]
Merge #11727
11727: minor: Fix metrics.json path r=lnicola a=lnicola
CC https://github.com/rust-analyzer/rust-analyzer/pull/11724#issuecomment-
1069047929
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Laurențiu Nicola [Wed, 16 Mar 2022 16:15:44 +0000 (18:15 +0200)]
Fix metrics.json path
bors[bot] [Wed, 16 Mar 2022 16:35:34 +0000 (16:35 +0000)]
Merge #11694
11694: fix: "Extract to function" assist preserves `break` and `continue` labels r=Veykril a=m0rg-dev
Adds a label / lifetime parameter to `ide_assists::handlers::extract_function::FlowKind::{Break, Continue}`, adds support for emitting labels to `syntax::ast::make::{expr_break, expr_continue}`, and implements the required machinery to let `extract_function` make use of them.
This does modify the external API of the `syntax` crate, but the changes there are simple, not used outside `ide_assists`, and, well, we should probably support emitting `break` and `continue` labels through `syntax` anyways, they're part of the language spec.
Closes #11413.
Co-authored-by: Morgan Thomas <corp@m0rg.dev>
bors[bot] [Wed, 16 Mar 2022 16:04:10 +0000 (16:04 +0000)]
Merge #11726
11726: internal: More ide_completion refactoring r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Wed, 16 Mar 2022 15:41:35 +0000 (16:41 +0100)]
Revert omitting field completions
Lukas Wirth [Wed, 16 Mar 2022 15:32:36 +0000 (16:32 +0100)]
Remove code duplication
Lukas Wirth [Wed, 16 Mar 2022 15:27:55 +0000 (16:27 +0100)]
Simplify completion render functionality
Lukas Wirth [Wed, 16 Mar 2022 12:41:35 +0000 (13:41 +0100)]
Rename compound things to variant things
bors[bot] [Wed, 16 Mar 2022 11:12:09 +0000 (11:12 +0000)]
Merge #11724
11724: minor: unblock metrics r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Wed, 16 Mar 2022 11:11:21 +0000 (12:11 +0100)]
minor: unblock metrics
bors[bot] [Wed, 16 Mar 2022 06:32:33 +0000 (06:32 +0000)]
Merge #11720
11720: fix: Mark chaining hints as types r=SomeoneToIgnore a=lnicola
CC https://github.com/rust-analyzer/rust-analyzer/pull/11445#discussion_r826863321
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Laurențiu Nicola [Wed, 16 Mar 2022 05:46:09 +0000 (07:46 +0200)]
Mark chaining hints as types, since that's what they are
bors[bot] [Tue, 15 Mar 2022 20:27:51 +0000 (20:27 +0000)]
Merge #11718
11718: Fix const generic panic r=lnicola a=HKalbasi
fix https://github.com/rust-analyzer/rust-analyzer/pull/11688#issuecomment-
1066824954
Co-authored-by: hkalbasi <hamidrezakalbasi@protonmail.com>
hkalbasi [Tue, 15 Mar 2022 19:04:05 +0000 (22:34 +0330)]
fix const generic panic
bors[bot] [Tue, 15 Mar 2022 18:05:27 +0000 (18:05 +0000)]
Merge #11708
11708: Update manual for inlay hint customization r=Veykril a=ian-h-chamberlain
Related to #6405, #6883 but not sure if they should be closed or not as this is just a documentation update.
This functionality was changed as of #11445 and now can be customized using native VSCode settings instead of `rust-analyzer`-specific ones.
Co-authored-by: Ian Chamberlain <ian-h-chamberlain@users.noreply.github.com>
bors[bot] [Tue, 15 Mar 2022 17:58:21 +0000 (17:58 +0000)]
Merge #11714
11714: fix: Fix completions not always working in for-loop patterns r=Veykril a=Veykril
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/11205
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Tue, 15 Mar 2022 17:06:34 +0000 (18:06 +0100)]
fix: Fix completions not always working in for-loop patterns
bors[bot] [Tue, 15 Mar 2022 07:27:05 +0000 (07:27 +0000)]
Merge #11710
11710: editors/code: fix crash due to missing ID= field r=lnicola a=cab404
Assuming ID=linux by default.
Also removed toLowerCase — it really shouldn't be needed.
Fixes #11709
Co-authored-by: Vladimir Serov <me@cab404.ru>
Vladimir Serov [Tue, 15 Mar 2022 03:52:03 +0000 (06:52 +0300)]
editors/code: fix crash due to missing ID= field
Assuming ID=linux in isNixOs by default. You can get away with
default "", but why do that if there's a default value in spec?)
Also removed toLowerCase — it really shouldn't be needed.
Fixes #11709
Ian Chamberlain [Mon, 14 Mar 2022 21:21:36 +0000 (17:21 -0400)]
Update manual for inlay hint customization
Closes #6883
This functionality was changed as of #11445 and now can be customized using native VSCode settings instead of `rust-analyzer`-specific ones.
bors[bot] [Mon, 14 Mar 2022 20:05:46 +0000 (20:05 +0000)]
Merge #11707
11707: minor: Simplify r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Mon, 14 Mar 2022 19:36:35 +0000 (20:36 +0100)]
Simplify
bors[bot] [Mon, 14 Mar 2022 15:02:34 +0000 (15:02 +0000)]
Merge #11700
11700: :arrow_up: xshell r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Sun, 13 Mar 2022 21:20:51 +0000 (21:20 +0000)]
:arrow_up: xshell
bors[bot] [Mon, 14 Mar 2022 11:15:00 +0000 (11:15 +0000)]
Merge #11688
11688: Add const generics r=HKalbasi a=HKalbasi
#7434 is not in this PR, so there is no evaluation of constants and no default const argument. But the rest (type inference and method resolution with chalk) should work.
Chalk is pedantic about kind of generic arguments, and will panic in case of mixing type and const arguments. I tried to add test that, but I'm not sure if it covers all cases.
Co-authored-by: hkalbasi <hamidrezakalbasi@protonmail.com>
hkalbasi [Wed, 9 Mar 2022 18:50:24 +0000 (22:20 +0330)]
Add const generics
Steven Joruk [Sun, 13 Mar 2022 13:25:06 +0000 (13:25 +0000)]
test: Make imported_external test that the full path is replaced
bors[bot] [Sun, 13 Mar 2022 09:25:55 +0000 (09:25 +0000)]
Merge #11696
11696: editors/code: fix nixos detection r=lnicola a=cab404
Problem: NixOS started using quotes around it's id field in /etc/os-release
Solution: Parially parsing os-release, and detecting, whether `nixos` appears anywhere in "ID=" field\
See https://github.com/rust-analyzer/rust-analyzer/issues/11695
Closes #11695
Co-authored-by: Vladimir Serov <me@cab404.ru>
Vladimir Serov [Sat, 12 Mar 2022 21:26:36 +0000 (00:26 +0300)]
editors/code: fix nixos detection
Problem: NixOS started using quotes around it's id field in /etc/os-release
Solution: Parially parsing os-release, and detecting, whether `nixos` appears anywhere in "ID=" field\
See https://github.com/rust-analyzer/rust-analyzer/issues/11695
Closes #11695
Morgan Thomas [Sat, 12 Mar 2022 18:35:26 +0000 (10:35 -0800)]
broke a test trying to make the diff look better...
Morgan Thomas [Sat, 12 Mar 2022 16:44:37 +0000 (08:44 -0800)]
fix: "Extract to function" assist preserves `break` and `continue` labels
Adds a label / lifetime parameter to `ide_assists::handlers::extract_function::FlowKind::{Break, Continue}`, adds support for emitting labels to `syntax::ast::make::{expr_break, expr_continue}`, and implements the required machinery to let `extract_function` make use of them.
This does modify the external API of the `syntax` crate, but the changes there are simple, not used outside `ide_assists`, and, well, we should probably support emitting `break` and `continue` labels through `syntax` anyways, they're part of the language spec.
Closes #11413.
Steven Joruk [Sat, 12 Mar 2022 15:59:00 +0000 (15:59 +0000)]
chore: Remove unused import