1
Fork 0

Implement and use BikeshedGuaranteedNoDrop for union/unsafe field validity

This commit is contained in:
Michael Goulet 2025-02-06 20:08:29 +00:00
parent c72d443cdd
commit 516afd557c
21 changed files with 365 additions and 66 deletions

View file

@ -168,6 +168,8 @@ pub enum SelectionCandidate<'tcx> {
BuiltinObjectCandidate,
BuiltinUnsizeCandidate,
BikeshedGuaranteedNoDropCandidate,
}
/// The result of trait evaluation. The order is important

View file

@ -217,6 +217,10 @@ impl<'tcx> rustc_type_ir::inherent::AdtDef<TyCtxt<'tcx>> for AdtDef<'tcx> {
self.is_phantom_data()
}
fn is_manually_drop(self) -> bool {
self.is_manually_drop()
}
fn all_field_tys(
self,
tcx: TyCtxt<'tcx>,

View file

@ -690,6 +690,7 @@ bidirectional_lang_item_map! {
AsyncFnOnce,
AsyncFnOnceOutput,
AsyncIterator,
BikeshedGuaranteedNoDrop,
CallOnceFuture,
CallRefFuture,
Clone,