about summary refs log tree commit diff
path: root/tests/codegen
diff options
context:
space:
mode:
authorJosh Triplett <josh@joshtriplett.org>2024-12-17 14:33:10 -0800
committerJosh Triplett <josh@joshtriplett.org>2024-12-17 14:33:10 -0800
commita105cd606628b07e79ab343cc183a176e278c809 (patch)
tree051f572eb6a1fcf3cb4541d4c427e0c13d02a8bd /tests/codegen
parenta4cb3c831823d9baa56c3d90514b75b2660116fa (diff)
downloadrust-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')
-rw-r--r--tests/codegen/issues/issue-15953.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/codegen/issues/issue-15953.rs b/tests/codegen/issues/issue-15953.rs
index 28d28428904..70e597ac1dd 100644
--- a/tests/codegen/issues/issue-15953.rs
+++ b/tests/codegen/issues/issue-15953.rs
@@ -9,7 +9,7 @@ struct Foo {
 #[no_mangle]
 // CHECK: memcpy
 fn interior(x: Vec<i32>) -> Vec<i32> {
-    let Foo { x } = Foo { x: x };
+    let Foo { x } = Foo { x };
     x
 }