mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
fix: remove space within {}
when no fields in struct
This commit is contained in:
parent
43576989a1
commit
aa1f1344cc
2 changed files with 35 additions and 11 deletions
|
@ -1039,7 +1039,27 @@ fn hover_record_struct_limit() {
|
|||
struct Foo { /* … */ }
|
||||
```
|
||||
"#]],
|
||||
)
|
||||
);
|
||||
|
||||
// No extra spaces within `{}` when there are no fields
|
||||
check_hover_fields_limit(
|
||||
5,
|
||||
r#"
|
||||
struct Foo$0 {}
|
||||
"#,
|
||||
expect![[r#"
|
||||
*Foo*
|
||||
|
||||
```rust
|
||||
test
|
||||
```
|
||||
|
||||
```rust
|
||||
// size = 0, align = 1
|
||||
struct Foo {}
|
||||
```
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue