pub struct SafeDropGraph<'tcx> {
pub alias_graph: AliasGraph<'tcx>,
pub bug_records: BugRecords,
pub drop_record: Vec<DropRecord>,
pub adt_owner: OHAResultMap,
}Expand description
We represent each target function with the SafeDropGraph struct and then perform analysis
based on the struct.
Fields§
§alias_graph: AliasGraph<'tcx>§bug_records: BugRecords§drop_record: Vec<DropRecord>§adt_owner: OHAResultMapImplementations§
Source§impl<'tcx> SafeDropGraph<'tcx>
impl<'tcx> SafeDropGraph<'tcx>
pub fn add_to_drop_record( &mut self, value_idx: usize, bb_idx: usize, flag_cleanup: bool, )
Source§impl<'tcx> SafeDropGraph<'tcx>
impl<'tcx> SafeDropGraph<'tcx>
pub fn from_path_graph( tcx: TyCtxt<'tcx>, def_id: DefId, path_graph: PathGraph<'tcx>, adt_owner: OHAResultMap, ) -> Self
fn from_alias_graph( alias_graph: AliasGraph<'tcx>, adt_owner: OHAResultMap, ) -> Self
Source§impl<'tcx> SafeDropGraph<'tcx>
impl<'tcx> SafeDropGraph<'tcx>
fn dfs_safedrop( &mut self, node: &PathNode, path: &mut Vec<usize>, fn_map: &MopFnAliasMap, ) -> Result<(), ()>
pub fn drop_check(&mut self, bb_idx: usize)
pub fn drop_heap_item_check(&self, place: &Place<'tcx>) -> bool
pub fn process_function_paths_opt( &mut self, precomputed_paths: Option<PathTree>, fn_map: &MopFnAliasMap, )
pub fn report_bugs(&self)
pub fn df_check( &mut self, value_idx: usize, bb_idx: usize, span: Span, flag_cleanup: bool, ) -> bool
pub fn dp_check(&mut self, flag_cleanup: bool)
fn dp_check_arg(&mut self, arg_idx: usize, flag_cleanup: bool)
Trait Implementations§
Auto Trait Implementations§
impl<'tcx> !RefUnwindSafe for SafeDropGraph<'tcx>
impl<'tcx> !Send for SafeDropGraph<'tcx>
impl<'tcx> !Sync for SafeDropGraph<'tcx>
impl<'tcx> !UnwindSafe for SafeDropGraph<'tcx>
impl<'tcx> DynSend for SafeDropGraph<'tcx>
impl<'tcx> DynSync for SafeDropGraph<'tcx>
impl<'tcx> Freeze for SafeDropGraph<'tcx>
impl<'tcx> Unpin for SafeDropGraph<'tcx>
impl<'tcx> UnsafeUnpin for SafeDropGraph<'tcx>
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> 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