Skip to main content

Module needs_drop

Module needs_drop 

Source
Expand description

Check whether a type has (potentially) non-trivial drop glue.

Re-exportsยง

use rustc_attr_ir::find_attr; ๐Ÿ”’
use rustc_data_structures::fx::FxHashSet; ๐Ÿ”’
use rustc_hir::def_id::DefId; ๐Ÿ”’
use rustc_middle::query::Providers; ๐Ÿ”’
use rustc_middle::ty::util::AlwaysRequiresDrop; ๐Ÿ”’
use rustc_middle::ty::util::needs_drop_components; ๐Ÿ”’
use rustc_middle::ty; ๐Ÿ”’
use rustc_middle::ty::EarlyBinder; ๐Ÿ”’
use rustc_middle::ty::GenericArgs; ๐Ÿ”’
use rustc_middle::ty::Ty; ๐Ÿ”’
use rustc_middle::ty::TyCtxt; ๐Ÿ”’
use rustc_middle::ty::Unnormalized; ๐Ÿ”’
use rustc_span::bug; ๐Ÿ”’
use rustc_structures::Limit; ๐Ÿ”’
use tracing::debug; ๐Ÿ”’
use tracing::instrument; ๐Ÿ”’
use tracing::instrument; ๐Ÿ”’
use crate::diagnostics::NeedsDropOverflow; ๐Ÿ”’

Structsยง

DropTysOptions ๐Ÿ”’
NeedsDropTypes ๐Ÿ”’

Enumsยง

DtorType ๐Ÿ”’

Functionsยง

adt_async_drop_tys ๐Ÿ”’
adt_consider_insignificant_dtor ๐Ÿ”’
adt_drop_tys ๐Ÿ”’
adt_significant_drop_tys ๐Ÿ”’
drop_tys_helper ๐Ÿ”’
filter_array_elements ๐Ÿ”’
HACK: in order to not mistakenly assume that [PhantomData<T>; N] requires drop glue we check the element type for drop glue. The correct fix would be looking at the entirety of the code around needs_drop_components and this file and come up with logic that is easier to follow while not repeating any checks that may thus diverge.
filter_array_elements_async ๐Ÿ”’
has_significant_drop_raw ๐Ÿ”’
list_significant_drop_tys ๐Ÿ”’
needs_async_drop_raw ๐Ÿ”’
needs_drop_raw ๐Ÿ”’
provide ๐Ÿ”’

Type Aliasesยง

NeedsDropResult ๐Ÿ”’