Stream: t-lang/wg-unsafe-code-guidelines

Topic: Initializing an aggregate field-by-field


RalfJ (Feb 14 2019 at 08:13, on Zulip):

At the all-hands, we talked about aggregate initializers vs. initializing an aggregate field-by-field, and then having some kind of "marker instruction" saying "now all fields have been initialized, go get it". I was doubtful about what this would even mean in terms of semantics, but now we have an example: I think this would help with https://github.com/solson/miri/issues/633.
Cc @eddyb @nikomatsakis

eddyb (Feb 14 2019 at 10:39, on Zulip):

interesting, so we would want to even keep it in

eddyb (Feb 14 2019 at 10:39, on Zulip):

instead of it being removed like some borrowck-only constructs are

RalfJ (Feb 14 2019 at 11:17, on Zulip):

yeah this seems like it could help tell the optimizer when it can rely on certain invariants

Last update: Nov 19 2019 at 18:45UTC