diff options
| author | Josh Triplett <josh@joshtriplett.org> | 2024-12-17 14:33:10 -0800 |
|---|---|---|
| committer | Josh Triplett <josh@joshtriplett.org> | 2024-12-17 14:33:10 -0800 |
| commit | a105cd606628b07e79ab343cc183a176e278c809 (patch) | |
| tree | 051f572eb6a1fcf3cb4541d4c427e0c13d02a8bd /tests/codegen-units | |
| parent | a4cb3c831823d9baa56c3d90514b75b2660116fa (diff) | |
| download | rust-a105cd606628b07e79ab343cc183a176e278c809.tar.gz rust-a105cd606628b07e79ab343cc183a176e278c809.zip | |
Use field init shorthand where possible
Field init shorthand allows writing initializers like `tcx: tcx` as `tcx`. The compiler already uses it extensively. Fix the last few places where it isn't yet used.
Diffstat (limited to 'tests/codegen-units')
| -rw-r--r-- | tests/codegen-units/item-collection/generic-impl.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/codegen-units/item-collection/generic-impl.rs b/tests/codegen-units/item-collection/generic-impl.rs index 23d09e0d8af..f6e49f6e6df 100644 --- a/tests/codegen-units/item-collection/generic-impl.rs +++ b/tests/codegen-units/item-collection/generic-impl.rs @@ -14,7 +14,7 @@ fn id<T>(x: T) -> T { impl<T> Struct<T> { fn new(x: T) -> Struct<T> { - Struct { x: x, f: id } + Struct { x, f: id } } fn get<T2>(self, x: T2) -> (T, T2) { |
