fn place_contents_drop_state_cannot_differ<'tcx>(
    tcx: TyCtxt<'tcx>,
    body: &Body<'tcx>,
    place: Place<'tcx>
) -> bool
Expand description

When enumerating the child fragments of a path, don’t recurse into paths (1.) past arrays, slices, and pointers, nor (2.) into a type that implements Drop.

Places behind references or arrays are not tracked by elaboration and are always assumed to be initialized when accessible. As references and indexes can be reseated, trying to track them can only lead to trouble.

Places behind ADT’s with a Drop impl are not tracked by elaboration since they can never have a drop-flag state that differs from that of the parent with the Drop impl.

In both cases, the contents can only be accessed if and only if their parents are initialized. This implies for example that there is no need to maintain separate drop flags to track such state.