Implement and use BikeshedGuaranteedNoDrop for union/unsafe field validity
This commit is contained in:
parent
c72d443cdd
commit
516afd557c
21 changed files with 365 additions and 66 deletions
|
@ -168,6 +168,8 @@ pub enum SelectionCandidate<'tcx> {
|
|||
BuiltinObjectCandidate,
|
||||
|
||||
BuiltinUnsizeCandidate,
|
||||
|
||||
BikeshedGuaranteedNoDropCandidate,
|
||||
}
|
||||
|
||||
/// The result of trait evaluation. The order is important
|
||||
|
|
|
@ -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>,
|
||||
|
|
|
@ -690,6 +690,7 @@ bidirectional_lang_item_map! {
|
|||
AsyncFnOnce,
|
||||
AsyncFnOnceOutput,
|
||||
AsyncIterator,
|
||||
BikeshedGuaranteedNoDrop,
|
||||
CallOnceFuture,
|
||||
CallRefFuture,
|
||||
Clone,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue