rapx::analysis::unsafety_isolation

Struct UnsafetyIsolationCheck

source
pub struct UnsafetyIsolationCheck<'tcx> {
    pub tcx: TyCtxt<'tcx>,
    pub nodes: Vec<IsolationGraphNode>,
    pub related_func_def_id: Vec<DefId>,
    pub uigs: Vec<UigUnit>,
    pub single: Vec<UigUnit>,
}

Fields§

§tcx: TyCtxt<'tcx>§nodes: Vec<IsolationGraphNode>§related_func_def_id: Vec<DefId>§uigs: Vec<UigUnit>§single: Vec<UigUnit>

Implementations§

source§

impl<'tcx> UnsafetyIsolationCheck<'tcx>

source§

impl<'tcx> UnsafetyIsolationCheck<'tcx>

source

pub fn handle_std_unsafe(&mut self)

source

pub fn get_all_std_unsafe_def_id_by_rustc_extern_crates( &mut self, tcx: TyCtxt<'tcx>, ) -> HashSet<DefId>

source

pub fn get_all_std_unsafe_def_id_by_treat_std_as_local_crate( &mut self, tcx: TyCtxt<'tcx>, ) -> HashSet<DefId>

source

pub fn analyze_uig(&self)

source

pub fn analyze_struct(&self)

source

pub fn get_struct(&self, def_id: DefId, cache: &mut HashSet<DefId>)

source

pub fn get_units_data(&mut self, tcx: TyCtxt<'tcx>)

source

pub fn process_def_id( &mut self, tcx: TyCtxt<'tcx>, def_id: DefId, visited: &mut HashSet<DefId>, unsafe_fn: &mut HashSet<DefId>, )

source

pub fn filter_mir(def_id: DefId) -> bool

source

pub fn insert_uig( &mut self, caller: DefId, callee_set: HashSet<DefId>, caller_cons: Vec<NodeType>, )

source§

impl<'tcx> UnsafetyIsolationCheck<'tcx>

source

pub fn new(tcx: TyCtxt<'tcx>) -> Self

source

pub fn start(&mut self, ins: UigInstruction)

source

pub fn check_doc(&self, def_id: DefId)

source

pub fn filter_and_extend_unsafe(&mut self)

source

fn check_if_unsafety_doc_exists(&self, def_id: DefId) -> bool

source

pub fn check_if_node_exists(&self, body_did: DefId) -> bool

source

pub fn get_name(&self, body_did: DefId) -> String

source

pub fn search_constructor(&mut self, def_id: DefId) -> Vec<DefId>

source

pub fn get_cons_counts(&self, def_id: DefId) -> Vec<DefId>

source

pub fn visit_node_callees(&mut self, def_id: DefId) -> Vec<DefId>

source

pub fn is_crate_api_node(&self, body_did: DefId) -> bool

source

pub fn check_and_insert_node(&mut self, body_did: DefId)

source

pub fn set_method_for_constructor( &mut self, constructor_did: DefId, method_did: DefId, )

source

pub fn set_caller_for_callee(&mut self, caller_did: DefId, callee_did: DefId)

source

pub fn show_nodes(&self)

Auto Trait Implementations§

§

impl<'tcx> Freeze for UnsafetyIsolationCheck<'tcx>

§

impl<'tcx> !RefUnwindSafe for UnsafetyIsolationCheck<'tcx>

§

impl<'tcx> !Send for UnsafetyIsolationCheck<'tcx>

§

impl<'tcx> !Sync for UnsafetyIsolationCheck<'tcx>

§

impl<'tcx> Unpin for UnsafetyIsolationCheck<'tcx>

§

impl<'tcx> !UnwindSafe for UnsafetyIsolationCheck<'tcx>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.