UPGAnalysis

Struct UPGAnalysis 

Source
pub struct UPGAnalysis<'tcx> {
    pub tcx: TyCtxt<'tcx>,
    pub upgs: Vec<UPGUnit>,
}

Fields§

§tcx: TyCtxt<'tcx>§upgs: Vec<UPGUnit>

Implementations§

Source§

impl<'tcx> UPGAnalysis<'tcx>

Source

pub fn audit_std_unsafe(&mut self)

Source

pub fn render_dot(&mut self)

Source

pub fn get_chains(&mut self)

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 check_params(&self, def_id: DefId)

Source

pub fn analyze_upg(&self)

Source

pub fn analyze_struct(&self)

Source

pub fn get_struct( &self, def_id: DefId, cache: &mut HashSet<DefId>, s: &mut usize, u: &mut usize, e: &mut usize, uc: &mut usize, vi: &mut usize, )

Source

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

Source

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

Source§

impl<'tcx> UPGAnalysis<'tcx>

Source

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

Source

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

Source

pub fn insert_upg(&mut self, def_id: DefId)

Source

pub fn generate_graph_dots(&self)

Main function to aggregate data and render DOT graphs per module.

Auto Trait Implementations§

§

impl<'tcx> Freeze for UPGAnalysis<'tcx>

§

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

§

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

§

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

§

impl<'tcx> Unpin for UPGAnalysis<'tcx>

§

impl<'tcx> !UnwindSafe for UPGAnalysis<'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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V