pub struct DefaultOwnership<'tcx, 'a> {
tcx: TyCtxt<'tcx>,
unique: HashSet<DefId>,
ref_adt_heap: &'a HeapOwnershipResultMap,
res: HeapOwnership,
param: bool,
ptr: bool,
}Fields§
§tcx: TyCtxt<'tcx>§unique: HashSet<DefId>§ref_adt_heap: &'a HeapOwnershipResultMap§res: HeapOwnership§param: bool§ptr: boolImplementations§
Source§impl<'tcx, 'a> DefaultOwnership<'tcx, 'a>
impl<'tcx, 'a> DefaultOwnership<'tcx, 'a>
pub fn new(tcx: TyCtxt<'tcx>, ref_adt_heap: &'a HeapOwnershipResultMap) -> Self
pub fn tcx(&self) -> TyCtxt<'tcx>
pub fn unique(&self) -> &HashSet<DefId>
pub fn unique_mut(&mut self) -> &mut HashSet<DefId>
pub fn get_res(&self) -> HeapOwnership
pub fn set_res(&mut self, res: HeapOwnership)
pub fn is_owning_true(&self) -> bool
pub fn get_param(&self) -> bool
pub fn set_param(&mut self, p: bool)
pub fn is_param_true(&self) -> bool
pub fn get_ptr(&self) -> bool
pub fn set_ptr(&mut self, p: bool)
pub fn is_ptr_true(&self) -> bool
pub fn heap(&self) -> &'a HeapOwnershipResultMap
Trait Implementations§
Source§impl<'tcx, 'a> Clone for DefaultOwnership<'tcx, 'a>
impl<'tcx, 'a> Clone for DefaultOwnership<'tcx, 'a>
Source§impl<'tcx, 'a> TypeVisitor<TyCtxt<'tcx>> for DefaultOwnership<'tcx, 'a>
impl<'tcx, 'a> TypeVisitor<TyCtxt<'tcx>> for DefaultOwnership<'tcx, 'a>
type Result = ControlFlow<()>
fn visit_ty(&mut self, ty: Ty<'tcx>) -> Self::Result
fn visit_binder<T>(&mut self, t: &Binder<I, T>) -> Self::Resultwhere
T: TypeVisitable<I>,
fn visit_region(&mut self, r: Region<I>) -> Self::Result
fn visit_const(&mut self, c: Const<I>) -> Self::Result
fn visit_predicate<P>(&mut self, p: P) -> Self::Resultwhere
P: PredicateProxy<I>,
fn visit_clauses(&mut self, c: <I as Interner>::Clauses) -> Self::Result
fn visit_error( &mut self, _guar: <I as Interner>::ErrorGuaranteed, ) -> Self::Result
Auto Trait Implementations§
impl<'tcx, 'a> !RefUnwindSafe for DefaultOwnership<'tcx, 'a>
impl<'tcx, 'a> !Send for DefaultOwnership<'tcx, 'a>
impl<'tcx, 'a> !Sync for DefaultOwnership<'tcx, 'a>
impl<'tcx, 'a> !UnwindSafe for DefaultOwnership<'tcx, 'a>
impl<'tcx, 'a> DynSend for DefaultOwnership<'tcx, 'a>
impl<'tcx, 'a> DynSync for DefaultOwnership<'tcx, 'a>
impl<'tcx, 'a> Freeze for DefaultOwnership<'tcx, 'a>
impl<'tcx, 'a> Unpin for DefaultOwnership<'tcx, 'a>
impl<'tcx, 'a> UnsafeUnpin for DefaultOwnership<'tcx, 'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more