Skip to content

Commit cccd8e7

Browse files
committed
fix: add semicolon to tuple struct
1 parent 4f89b20 commit cccd8e7

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

crates/hir/src/display.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ impl HirDisplay for Struct {
177177
}
178178
}
179179

180-
f.write_str(")")?;
180+
f.write_str(");")?;
181181
}
182182

183183
write_where_clause(def_id, f)?;

crates/ide/src/hover/tests.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2403,7 +2403,7 @@ fn main() { let s$0t = S{ f1:Arg(0) }; }
24032403
focus_range: 7..10,
24042404
name: "Arg",
24052405
kind: Struct,
2406-
description: "struct Arg(u32)",
2406+
description: "struct Arg(u32);",
24072407
},
24082408
},
24092409
],
@@ -2462,7 +2462,7 @@ fn main() { let s$0t = S{ f1: S{ f1: Arg(0) } }; }
24622462
focus_range: 7..10,
24632463
name: "Arg",
24642464
kind: Struct,
2465-
description: "struct Arg(u32)",
2465+
description: "struct Arg(u32);",
24662466
},
24672467
},
24682468
],
@@ -2498,7 +2498,7 @@ fn main() { let s$0t = (A(1), B(2), M::C(3) ); }
24982498
focus_range: 7..8,
24992499
name: "A",
25002500
kind: Struct,
2501-
description: "struct A(u32)",
2501+
description: "struct A(u32);",
25022502
},
25032503
},
25042504
HoverGotoTypeData {
@@ -2511,7 +2511,7 @@ fn main() { let s$0t = (A(1), B(2), M::C(3) ); }
25112511
focus_range: 22..23,
25122512
name: "B",
25132513
kind: Struct,
2514-
description: "struct B(u32)",
2514+
description: "struct B(u32);",
25152515
},
25162516
},
25172517
HoverGotoTypeData {
@@ -2525,7 +2525,7 @@ fn main() { let s$0t = (A(1), B(2), M::C(3) ); }
25252525
name: "C",
25262526
kind: Struct,
25272527
container_name: "M",
2528-
description: "pub struct C(u32)",
2528+
description: "pub struct C(u32);",
25292529
},
25302530
},
25312531
],
@@ -3346,7 +3346,7 @@ struct S$0T<const C: usize = 1, T = Foo>(T);
33463346
```
33473347
33483348
```rust
3349-
struct ST<const C: usize = 1, T = Foo>(T)
3349+
struct ST<const C: usize = 1, T = Foo>(T);
33503350
```
33513351
"#]],
33523352
);
@@ -3367,7 +3367,7 @@ struct S$0T<const C: usize = {40 + 2}, T = Foo>(T);
33673367
```
33683368
33693369
```rust
3370-
struct ST<const C: usize = {const}, T = Foo>(T)
3370+
struct ST<const C: usize = {const}, T = Foo>(T);
33713371
```
33723372
"#]],
33733373
);
@@ -3389,7 +3389,7 @@ struct S$0T<const C: usize = VAL, T = Foo>(T);
33893389
```
33903390
33913391
```rust
3392-
struct ST<const C: usize = VAL, T = Foo>(T)
3392+
struct ST<const C: usize = VAL, T = Foo>(T);
33933393
```
33943394
"#]],
33953395
);
@@ -5946,7 +5946,7 @@ pub struct Foo(i32);
59465946
```
59475947
59485948
```rust
5949-
pub struct Foo(i32) // size = 4, align = 4
5949+
pub struct Foo(i32); // size = 4, align = 4
59505950
```
59515951
59525952
---

0 commit comments

Comments
 (0)