]>
git.lizzy.rs Git - rust.git/log
bors[bot] [Fri, 14 Jan 2022 10:08:27 +0000 (10:08 +0000)]
Merge #11282
11282: fix: Properly cache files in Semantics when ascending macros r=Veykril a=Veykril
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/11280
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Fri, 14 Jan 2022 10:07:53 +0000 (11:07 +0100)]
fix: Properly cache files in Semantics when ascending macros
Lukas Wirth [Fri, 14 Jan 2022 09:59:27 +0000 (10:59 +0100)]
Replace HasSource usages with Semantics equivalent
bors[bot] [Thu, 13 Jan 2022 19:18:47 +0000 (19:18 +0000)]
Merge #11276
11276: internal: Slightly cleanup HasFormatSpecifier::lex_format_specifier r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
bors[bot] [Thu, 13 Jan 2022 19:08:38 +0000 (19:08 +0000)]
Merge #11277
11277: minor: reformat and fix warning r=lnicola a=lnicola
bors r+
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Laurențiu Nicola [Thu, 13 Jan 2022 19:08:04 +0000 (21:08 +0200)]
Remove duplicate test attribute
Laurențiu Nicola [Thu, 13 Jan 2022 19:07:17 +0000 (21:07 +0200)]
Reformat code
Lukas Wirth [Thu, 13 Jan 2022 18:12:39 +0000 (19:12 +0100)]
Slightly cleanup HasFormatSpecifier::lex_format_specifier
bors[bot] [Thu, 13 Jan 2022 15:19:03 +0000 (15:19 +0000)]
Merge #11274
11274: internal: Unexport `MacroDefId` from `hir` r=jonas-schievink a=jonas-schievink
It's not used outside of it
bors r+
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
Jonas Schievink [Thu, 13 Jan 2022 15:18:05 +0000 (16:18 +0100)]
Unexport `MacroDefId` from `hir`
bors[bot] [Wed, 12 Jan 2022 19:22:15 +0000 (19:22 +0000)]
Merge #11267
11267: internal: Remove `ModuleId` from `hir` reexports r=jonas-schievink a=jonas-schievink
followup to https://github.com/rust-analyzer/rust-analyzer/pull/11266
bors r+
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
Jonas Schievink [Wed, 12 Jan 2022 19:19:10 +0000 (20:19 +0100)]
Remove `ModuleId` from `hir` reexports
bors[bot] [Wed, 12 Jan 2022 18:58:24 +0000 (18:58 +0000)]
Merge #11266
11266: internal: Mostly restore `hir` API boundary r=jonas-schievink a=jonas-schievink
The boundary was broken in https://github.com/rust-analyzer/rust-analyzer/pull/10872 by reexporting a bunch of `hir_def`-internal types.
This PR moves symbol collection to `hir` and removes those reexports again.
bors r+
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
Jonas Schievink [Wed, 12 Jan 2022 18:56:47 +0000 (19:56 +0100)]
Mostly restore `hir` API boundary
bors[bot] [Wed, 12 Jan 2022 12:30:41 +0000 (12:30 +0000)]
Merge #11265
11265: fix: Fix postfix completion panic r=lnicola a=Veykril
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/11233
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Wed, 12 Jan 2022 12:07:16 +0000 (13:07 +0100)]
fix: Fix postfix completion panic
bors[bot] [Wed, 12 Jan 2022 11:37:18 +0000 (11:37 +0000)]
Merge #11263
11263: fix: Fix don't drop param completions when fully typing out a pattern r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Wed, 12 Jan 2022 11:36:46 +0000 (12:36 +0100)]
fix: Fix don't drop param completions when fully typing out a pattern
bors[bot] [Tue, 11 Jan 2022 18:04:09 +0000 (18:04 +0000)]
Merge #11261
11261: fix: Don't complete attributes with existing expressions r=Veykril a=Veykril
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/11254 due to the comment being lowered to an attribute
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Tue, 11 Jan 2022 18:03:21 +0000 (19:03 +0100)]
Don't complete attributes with existing expressions
bors[bot] [Tue, 11 Jan 2022 14:43:44 +0000 (14:43 +0000)]
Merge #11259
11259: fix: fix `use super::{super::...};` r=jonas-schievink a=jonas-schievink
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/11249
bors r+
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
Jonas Schievink [Tue, 11 Jan 2022 14:30:39 +0000 (15:30 +0100)]
Fix concatenation of `super` mod paths
bors[bot] [Tue, 11 Jan 2022 14:17:18 +0000 (14:17 +0000)]
Merge #11258
11258: Kate uses rust-analyzer by default now r=jonas-schievink a=milliams
Since Kate 21.12 rust-analyzer is the default. See this Kate MR: https://invent.kde.org/utilities/kate/-/merge_requests/495
Co-authored-by: Matt Williams <matt@milliams.com>
bors[bot] [Tue, 11 Jan 2022 13:36:53 +0000 (13:36 +0000)]
Merge #11257
11257: feat: Report `DefDiagnostic`s from inside item bodies r=jonas-schievink a=jonas-schievink
Reports diagnostics from all block-level `DefMap`s, and adds some code to avoid adding duplicate diagnostics to the body's `SourceMap`.
bors r+
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
Matt Williams [Tue, 11 Jan 2022 13:36:06 +0000 (13:36 +0000)]
Kate uses rust-analyzer by default
Jonas Schievink [Tue, 11 Jan 2022 13:34:25 +0000 (14:34 +0100)]
Report `DefDiagnostic`s from inside item bodies
bors[bot] [Tue, 11 Jan 2022 09:39:12 +0000 (09:39 +0000)]
Merge #11210
11210: feat: Deprioritize ops methods in completion r=Veykril a=Veykril
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/10593
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Tue, 11 Jan 2022 09:07:16 +0000 (10:07 +0100)]
Lookup lang attribute on assoc item trait directly
Lukas Wirth [Thu, 6 Jan 2022 12:36:43 +0000 (13:36 +0100)]
Update tests
Lukas Wirth [Thu, 6 Jan 2022 12:31:36 +0000 (13:31 +0100)]
feat: Deprioritize ops methods in completion
bors[bot] [Tue, 11 Jan 2022 08:11:55 +0000 (08:11 +0000)]
Merge #11252
11252: Fix documentation of snippet r=Veykril a=weirane
Closes #11234
Co-authored-by: Wang Ruochen <wrc@ruo-chen.wang>
Wang Ruochen [Tue, 11 Jan 2022 04:47:54 +0000 (20:47 -0800)]
Fix documentation of snippet
bors[bot] [Mon, 10 Jan 2022 15:56:54 +0000 (15:56 +0000)]
Merge #11247
11247: Print a single ellipsis for any number of omitted types r=jonas-schievink a=jonas-schievink
Helps a little bit with https://github.com/rust-analyzer/rust-analyzer/issues/11240
bors r+
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
Jonas Schievink [Mon, 10 Jan 2022 15:55:53 +0000 (16:55 +0100)]
Print a single ellipsis for any number of omitted types
bors[bot] [Sat, 8 Jan 2022 14:46:01 +0000 (14:46 +0000)]
Merge #11238
11238: fix: shrink the span of errors from attribute macros and derives r=jonas-schievink a=jonas-schievink
Some procedural macros tend to get very large invocations, for example RTIC's, leading to issues like https://github.com/rtic-rs/cortex-m-rtic/issues/582, where almost the entire screen is underlined while editing incomplete code in the macro.
This PR shrinks the spans of errors from attribute macros and derives to point only at the attribute, which also matches rustc more closely.
bors r+
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
Jonas Schievink [Sat, 8 Jan 2022 14:38:50 +0000 (15:38 +0100)]
Shrink diagnostic spans for errors inside macros
Jonas Schievink [Sat, 8 Jan 2022 14:01:26 +0000 (15:01 +0100)]
Allow doc comments on all `Item`s
bors[bot] [Sat, 8 Jan 2022 13:55:18 +0000 (13:55 +0000)]
Merge #11237
11237: fix: Fix outline modules spilling inner doc injections into their parent r=Veykril a=Veykril
Fixes another regression caused by https://github.com/rust-analyzer/rust-analyzer/pull/11225
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Sat, 8 Jan 2022 13:54:31 +0000 (14:54 +0100)]
fix: Fix outline modules spilling inner doc injections into their parent
bors[bot] [Sat, 8 Jan 2022 11:17:56 +0000 (11:17 +0000)]
Merge #11236
11236: internal: Remove `InFile` wrapping from `DynMap` keys r=Veykril a=Veykril
We already store a `DynMap` per `(Container, HirFileId)` pair, so the `InFile` keys are already guruanteed to always be of the same file id
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Sat, 8 Jan 2022 11:13:45 +0000 (12:13 +0100)]
Remove `InFile` wrapping from DynMap keys
Lukas Wirth [Sat, 8 Jan 2022 10:34:58 +0000 (11:34 +0100)]
Only add generics with the correct file id to DynMap
bors[bot] [Sat, 8 Jan 2022 10:11:37 +0000 (10:11 +0000)]
Merge #11235
11235: internal: Record attribute calls on assoc items in TraitData and ImplData r=Veykril a=Veykril
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/11228
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Sat, 8 Jan 2022 10:04:16 +0000 (11:04 +0100)]
Do less allocs in `trait_data` and `impl_data` queries
Lukas Wirth [Sat, 8 Jan 2022 09:45:12 +0000 (10:45 +0100)]
Record attribute calls on assoc items in TraitData and ImplData
bors[bot] [Sat, 8 Jan 2022 09:05:09 +0000 (09:05 +0000)]
Merge #11107
11107: Fix generic type substitution in impl trait with assoc type r=pnevyk a=pnevyk
Fixes #11045
The path transform now detects if a type parameter that is being substituted has an associated type. In that case it is necessary (or safe in general case) to fully qualify the substitution with a trait which the associated type belongs to.
This PR also fixes the previous wrong behavior of the substitution that could create an invalid tree `PATH_TYPE -> PATH_TYPE -> ...`.
Co-authored-by: Petr Nevyhoštěný <petr.nevyhosteny@gmail.com>
bors[bot] [Fri, 7 Jan 2022 20:52:57 +0000 (20:52 +0000)]
Merge #11232
11232: Filter out macro calls by file id in when building DynMap r=Veykril a=Veykril
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Fri, 7 Jan 2022 20:51:59 +0000 (21:51 +0100)]
Simplify
Lukas Wirth [Fri, 7 Jan 2022 20:31:08 +0000 (21:31 +0100)]
Filter out macro calls by file id in when building DynMap
bors[bot] [Fri, 7 Jan 2022 18:06:33 +0000 (18:06 +0000)]
Merge #11230
11230: fix: Fix attribute stripping ignoring doc comments r=Veykril a=Veykril
Follow up to https://github.com/rust-analyzer/rust-analyzer/pull/11225#pullrequestreview-
846779237
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Fri, 7 Jan 2022 17:51:10 +0000 (18:51 +0100)]
fix: Fix attribute stripping ignoring doc comments
Petr Nevyhoštěný [Fri, 7 Jan 2022 15:41:39 +0000 (16:41 +0100)]
Fix generic type substitution in impl trait with assoc const
bors[bot] [Fri, 7 Jan 2022 14:10:11 +0000 (14:10 +0000)]
Merge #11145
11145: feat: add config to use reasonable default expression instead of todo! when filling missing fields r=Veykril a=bnjjj
Use `Default::default()` in struct fields when we ask to fill it instead of putting `todo!()` for every fields
before:
```rust
pub enum Other {
One,
Two,
}
pub struct Test {
text: String,
num: usize,
other: Other,
}
fn t_test() {
let test = Test {<|>};
}
```
after:
```rust
pub enum Other {
One,
Two,
}
pub struct Test {
text: String,
num: usize,
other: Other,
}
fn t_test() {
let test = Test {
text: String::new(),
num: 0,
other: todo!(),
};
}
```
Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Co-authored-by: Coenen Benjamin <benjamin.coenen@hotmail.com>
bors[bot] [Fri, 7 Jan 2022 14:02:01 +0000 (14:02 +0000)]
Merge #11220
11220: Turbo fish assist: don't include lifetime parameters r=Veykril a=Vannevelj
Fixes #11219
The issue talks about three different types of params: type, const & lifetime. I wasn't entirely sure which ones are intended to be included here so I've gone for the type & const params (i.e. exclude lifetime).
I've added a test case for both a lifetime param and a const param. I'm still making my way through the rust book (chapter 7, yay) so I'm not too sure yet what these are but my testing shows that this approach generates code that compiles.
Co-authored-by: Jeroen Vannevel <jer_vannevel@outlook.com>
Benjamin Coenen [Fri, 7 Jan 2022 14:01:37 +0000 (15:01 +0100)]
feat(diagnostics): use default expression instead of todo! when missing fields
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Jeroen Vannevel [Fri, 7 Jan 2022 13:53:42 +0000 (13:53 +0000)]
succinct code
bors[bot] [Fri, 7 Jan 2022 13:38:23 +0000 (13:38 +0000)]
Merge #11225
11225: internal: Cleanup doc and attribute handling r=Veykril a=Veykril
(very vague PR title but as I tried to fix the mentioned issue I ran into more and more subtle things that were interwoven)
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/11215
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Fri, 7 Jan 2022 13:29:58 +0000 (14:29 +0100)]
Update item tree test output
bors[bot] [Fri, 7 Jan 2022 13:24:58 +0000 (13:24 +0000)]
Merge #11194
11194: fix(gen-doc-assist): remove lifetimes in description of `new` r=Veykril a=numero-744
From wrong behavior:
```rust
/// Creates a new [`MyGenericStruct<'a, T>`].
```
to correct behavior:
```rust
/// Creates a new [`MyGenericStruct<T>`].
```
But I feel like there is a better way to implement it. Do you know if there is an existing function that could do the work of `lifetimes_removed()` below?
Co-authored-by: Côme ALLART <come.allart@etu.emse.fr>
Lukas Wirth [Fri, 7 Jan 2022 13:19:11 +0000 (14:19 +0100)]
Use `FileAstId<ast::Adt>` in nameres where appropriate instead
Jeroen Vannevel [Fri, 7 Jan 2022 13:17:21 +0000 (13:17 +0000)]
include tabstops
Lukas Wirth [Fri, 7 Jan 2022 13:14:33 +0000 (14:14 +0100)]
Better interface for doc comment and attribute processing
Benjamin Coenen [Fri, 7 Jan 2022 13:13:34 +0000 (14:13 +0100)]
feat(diagnostics): use default expression instead of todo! when missing fields
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
Côme ALLART [Fri, 7 Jan 2022 13:04:03 +0000 (14:04 +0100)]
refactor: apply suggestions
See PR #11194
Coenen Benjamin [Fri, 7 Jan 2022 13:07:02 +0000 (14:07 +0100)]
Update crates/rust-analyzer/src/config.rs
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Jeroen Vannevel [Fri, 7 Jan 2022 12:40:41 +0000 (12:40 +0000)]
fmt
Jeroen Vannevel [Fri, 7 Jan 2022 12:34:03 +0000 (12:34 +0000)]
concise filtering
Lukas Wirth [Fri, 7 Jan 2022 11:37:58 +0000 (12:37 +0100)]
Generate `AnyHasDocComments` node
Jeroen Vannevel [Fri, 7 Jan 2022 01:09:32 +0000 (01:09 +0000)]
support const params
Jeroen Vannevel [Fri, 7 Jan 2022 01:02:16 +0000 (01:02 +0000)]
Count the type parameters only
bors[bot] [Thu, 6 Jan 2022 23:17:51 +0000 (23:17 +0000)]
Merge #11218
11218: fix: Correct has_ref detection, avoiding duplicate &mut insertion on parameter completion r=Veykril a=weirane
The original code fails to detect there's a ref in scenarios such as `&mut s` and `& s` because `WHITESPACE` and `IDENT` got reversed.
Closes #11199.
Co-authored-by: Wang Ruochen <wrc@ruo-chen.wang>
Wang Ruochen [Thu, 6 Jan 2022 19:45:09 +0000 (11:45 -0800)]
Correct has_ref detection
Benjamin Coenen [Thu, 6 Jan 2022 14:42:29 +0000 (15:42 +0100)]
add better default behavior on fill struct fields diagnostic
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
bors[bot] [Thu, 6 Jan 2022 14:39:34 +0000 (14:39 +0000)]
Merge #11217
11217: minor: Move pretty-printing test out of assist r=lnicola a=lnicola
bors r+
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Laurențiu Nicola [Thu, 6 Jan 2022 14:38:25 +0000 (16:38 +0200)]
Move pretty-printing test out of assist
bors[bot] [Thu, 6 Jan 2022 13:57:17 +0000 (13:57 +0000)]
Merge #11216
11216: internal: Support registered tools and attributes in ide layer r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Thu, 6 Jan 2022 13:56:50 +0000 (14:56 +0100)]
internal: Support registered tools and attributes in ide layer
bors[bot] [Thu, 6 Jan 2022 13:24:43 +0000 (13:24 +0000)]
Merge #11214
11214: feat: poke user when supplying faulty configurations r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Thu, 6 Jan 2022 13:23:35 +0000 (14:23 +0100)]
feat: poke user when supplying faulty configurations
bors[bot] [Thu, 6 Jan 2022 12:53:49 +0000 (12:53 +0000)]
Merge #11193
11193: feat: Add config to replace specific proc-macros with dummy expanders r=Veykril a=Veykril
With this one can specify proc-macros from crates to expand into their input as a (temporary) workaround for the current completion problems with some of the bigger attribute proc-macros like `async_trait`.
This could've been done by just not expanding these macros, but that would require fiddling with nameres. I felt like this approach was simpler to pull off while also keeping the behaviour of the attributes/proc-macro in that they still expand instead of being dead syntax to us.
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/11052
Usage(`async_trait` as example):
```jsonc
"rust-analyzer.procMacro.dummies": {
"async-trait": [ // crate name(as per its cargo.toml definition, not the dependency name)
"async_trait" // exported proc-macro name
]
},
```
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Thu, 6 Jan 2022 12:44:21 +0000 (13:44 +0100)]
Adjust config name
Lukas Wirth [Wed, 5 Jan 2022 18:35:48 +0000 (19:35 +0100)]
Regenrate docs and package.json
Lukas Wirth [Tue, 4 Jan 2022 19:40:16 +0000 (20:40 +0100)]
feat: Add config to replace specific proc-macros with dummy expanders
bors[bot] [Thu, 6 Jan 2022 12:41:02 +0000 (12:41 +0000)]
Merge #11211
11211: fix: Fix parsing of `#[derive]` paths r=jonas-schievink a=jonas-schievink
Currently this code produces an empty derive path for every `,`, which makes the IDE layer resolve derive paths to the wrong derive macro in the list. Skip `,`s to fix that. (nameres just ignored them, so it didn't cause problems there)
bors r+
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
Jonas Schievink [Thu, 6 Jan 2022 12:39:20 +0000 (13:39 +0100)]
Fix parsing of `#[derive]` paths
bors[bot] [Thu, 6 Jan 2022 11:56:29 +0000 (11:56 +0000)]
Merge #11209
11209: minor: Use`const _` instead of `mod __` r=jonas-schievink a=jonas-schievink
We now handle it correctly
bors r+
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
Jonas Schievink [Thu, 6 Jan 2022 11:55:33 +0000 (12:55 +0100)]
Use`const _` instead of `mod __`
bors[bot] [Thu, 6 Jan 2022 11:31:19 +0000 (11:31 +0000)]
Merge #11208
11208: feat: expand attribute macros on impl and trait items r=jonas-schievink a=jonas-schievink
fixes https://github.com/rust-analyzer/rust-analyzer/issues/11104
bors r+
Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
Jonas Schievink [Thu, 6 Jan 2022 11:30:16 +0000 (12:30 +0100)]
Expand attribute macros on impl and trait items
bors[bot] [Thu, 6 Jan 2022 10:48:54 +0000 (10:48 +0000)]
Merge #11207
11207: Always put a space after impl in macro pretty-printing r=Veykril a=jplatte
… regardless of whether the next symbol is punctuation or not.
Followup to #11200.
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
Jonas Platte [Thu, 6 Jan 2022 10:08:32 +0000 (11:08 +0100)]
Always put a space after impl in macro pretty-printing
… regardless of whether the next symbol is punctuation or not.
Côme ALLART [Thu, 6 Jan 2022 00:51:04 +0000 (01:51 +0100)]
fix: remove brackets if no generic types
bors[bot] [Wed, 5 Jan 2022 22:47:30 +0000 (22:47 +0000)]
Merge #11204
11204: fix: `replace_qualified_name_with_use` does not use full item path for replacements r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Wed, 5 Jan 2022 22:46:58 +0000 (23:46 +0100)]
fix: `replace_qualified_name_with_use` does not use full item path for replacements
bors[bot] [Wed, 5 Jan 2022 21:30:50 +0000 (21:30 +0000)]
Merge #11195 #11202
11195: Correctly pass through reference modifiers when extracting a variable r=Veykril a=Vannevelj
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/10034
This will parse the field expression and look at whether it is marked `&` or `&mut` and include a modifier if appropriate. The original issue only mentions `&mut params` but I've found that this issue also occurs for `&mut locals` as well as `¶ms` and `&locals` so I've also added tests for them.
I'd definitely be interested in hearing where I can make my code more idiomatic for Rust.
11202: fix: Fix `apply_demorgan` assist hanging for certain binary expressions r=Veykril a=Veykril
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/10963
bors r+
Co-authored-by: Jeroen Vannevel <jer_vannevel@outlook.com>
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Lukas Wirth [Wed, 5 Jan 2022 21:30:19 +0000 (22:30 +0100)]
fix: Fix `apply_demorgan` assist hanging for certain binary expressions
Jeroen Vannevel [Wed, 5 Jan 2022 21:16:24 +0000 (21:16 +0000)]
removed double matching
Jeroen Vannevel [Wed, 5 Jan 2022 21:12:09 +0000 (21:12 +0000)]
no PathExpr arm
Jeroen Vannevel [Wed, 5 Jan 2022 21:10:03 +0000 (21:10 +0000)]
.clone() over .to_owned()
Jeroen Vannevel [Wed, 5 Jan 2022 21:08:46 +0000 (21:08 +0000)]
less wordy ref_kind assignment