Skip to content

Commit 466cd07

Browse files
committed
Rustftmt
1 parent 351688d commit 466cd07

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

tests/ui/use_self.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,7 @@ mod nesting {
253253

254254
impl Bar {
255255
fn bar() -> Bar {
256-
Bar {
257-
foo: Foo{},
258-
}
256+
Bar { foo: Foo {} }
259257
}
260258
}
261259
}

tests/ui/use_self.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ LL | fn bar() -> Bar {
159159
error: unnecessary structure name repetition
160160
--> $DIR/use_self.rs:256:21
161161
|
162-
LL | Bar {
162+
LL | Bar { foo: Foo {} }
163163
| ^^^ help: use the applicable keyword: `Self`
164164

165165
error: aborting due to 26 previous errors

0 commit comments

Comments
 (0)