Skip to main content

Module significant_drop_order

Module significant_drop_order 

Source

Re-exportsΒ§

use rustc_data_structures::fx::FxHashSet; πŸ”’
use rustc_data_structures::unord::UnordSet; πŸ”’
use rustc_hir::def_id::DefId; πŸ”’
use rustc_span::Span; πŸ”’
use smallvec::SmallVec; πŸ”’
use smallvec::smallvec; πŸ”’
use tracing::debug; πŸ”’
use tracing::instrument; πŸ”’
use tracing::instrument; πŸ”’
use crate::ty; πŸ”’
use crate::ty::Ty; πŸ”’
use crate::ty::TyCtxt; πŸ”’
use crate::ty::Unnormalized; πŸ”’

FunctionsΒ§

extract_component_raw
Returns the list of types with a β€œpotentially significant” that may be dropped by dropping a value of type ty.
extract_component_with_significant_dtor
true_significant_drop_ty πŸ”’
An additional filter to exclude well-known types from the ecosystem because their drops are trivial. This returns additional types to check if the drops are delegated to those. A typical example is hashbrown::HashMap<K, V>, whose drop is delegated to K and V.
ty_dtor_span
Extract the span of the custom destructor of a type especially the span of the impl Drop header or its entire block when we are working with current local crate.