Give ReturnExpr a target only when initialization is in-place (#6570)

Also clarify and enforce that `ConversionTarget::init_id` is used only
as storage for in-place initialization, and correspondingly rename it to
`storage_id`.
This commit is contained in:
Geoff Romer
2026-01-13 01:20:15 +00:00
committed by GitHub
parent 93c7c9ad96
commit e1ec8d42d1
194 changed files with 575 additions and 556 deletions
+1 -1
View File
@@ -168,7 +168,7 @@ fn F() -> i32 {
// CHECK:STDOUT: %DestroyOp.call.loc17: init %empty_tuple.type = call %DestroyOp.bound.loc17(%p.var)
// CHECK:STDOUT: %DestroyOp.bound.loc16: <bound method> = bound_method %n.var, constants.%DestroyOp.b0ebf8.2
// CHECK:STDOUT: %DestroyOp.call.loc16: init %empty_tuple.type = call %DestroyOp.bound.loc16(%n.var)
// CHECK:STDOUT: return %Int.as.Copy.impl.Op.call to %return.param
// CHECK:STDOUT: return %Int.as.Copy.impl.Op.call
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: fn @DestroyOp.loc17(%self.param: %ptr.235) = "no_op";