mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-16 15:14:02 +00:00
Do not insert a newline after ;
if the next token is a }
This creates double newline.
This commit is contained in:
parent
e295f0c29c
commit
26b5f1f92f
2 changed files with 3 additions and 4 deletions
|
@ -95,7 +95,7 @@ pub fn insert_ws_into(syn: SyntaxNode) -> SyntaxNode {
|
|||
AS_KW | DYN_KW | IMPL_KW | CONST_KW => {
|
||||
mods.push(do_ws(after, tok));
|
||||
}
|
||||
T![;] => {
|
||||
T![;] if is_next(|it| it != R_CURLY, true) => {
|
||||
if indent > 0 {
|
||||
mods.push(do_indent(after, tok, indent));
|
||||
}
|
||||
|
|
|
@ -5166,7 +5166,6 @@ fn main() { $0V; }
|
|||
```rust
|
||||
pub static V: i8 = {
|
||||
let e = 123;
|
||||
|
||||
}
|
||||
```
|
||||
"#]],
|
||||
|
|
Loading…
Reference in a new issue