#60840 introduces the expectation that once drop runs on a local, it is UB for that local to be accessed, regardless of the success or failure (panic) of the drop. Unfortunately, adding extra StorageDeads for all of these values caused a performance regression, so at the moment we don't do this. #60840 instead uses drop to indicate that a value is implicitly StorageDead. However, this interacts poorly with drop elaboration, which can turn a drop of a structure into drops of its fields.
cc @Zoxc @tmandry @RalfJung
#60840 introduces the expectation that once
dropruns on a local, it is UB for that local to be accessed, regardless of the success or failure (panic) of thedrop. Unfortunately, adding extraStorageDeads for all of these values caused a performance regression, so at the moment we don't do this. #60840 instead usesdropto indicate that a value is implicitlyStorageDead. However, this interacts poorly with drop elaboration, which can turn adropof a structure intodrops of its fields.cc @Zoxc @tmandry @RalfJung