mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
review update
This commit is contained in:
parent
a89e417ce5
commit
ba8c9810aa
2 changed files with 3 additions and 1 deletions
|
@ -185,8 +185,8 @@ impl HirDisplay for Struct {
|
||||||
write_where_clause(def_id, f)?;
|
write_where_clause(def_id, f)?;
|
||||||
}
|
}
|
||||||
StructKind::Record => {
|
StructKind::Record => {
|
||||||
if let Some(limit) = f.entity_limit {
|
|
||||||
let has_where_clause = write_where_clause(def_id, f)?;
|
let has_where_clause = write_where_clause(def_id, f)?;
|
||||||
|
if let Some(limit) = f.entity_limit {
|
||||||
let fields = self.fields(f.db);
|
let fields = self.fields(f.db);
|
||||||
let count = fields.len().min(limit);
|
let count = fields.len().min(limit);
|
||||||
f.write_char(if !has_where_clause { ' ' } else { '\n' })?;
|
f.write_char(if !has_where_clause { ' ' } else { '\n' })?;
|
||||||
|
|
|
@ -872,6 +872,8 @@ struct Foo$0 where u32: Copy { field: u32 }
|
||||||
```rust
|
```rust
|
||||||
// size = 4, align = 4
|
// size = 4, align = 4
|
||||||
struct Foo
|
struct Foo
|
||||||
|
where
|
||||||
|
u32: Copy,
|
||||||
```
|
```
|
||||||
"#]],
|
"#]],
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue