rustc_utils::mir::adt_def

Trait AdtDefExt

Source
pub trait AdtDefExt<'tcx> {
    // Required method
    fn all_visible_fields(
        self,
        module: DefId,
        tcx: TyCtxt<'tcx>,
    ) -> impl Iterator<Item = &'tcx FieldDef>;
}
Expand description

Extension trait for AdtDef.

Required Methods§

Source

fn all_visible_fields( self, module: DefId, tcx: TyCtxt<'tcx>, ) -> impl Iterator<Item = &'tcx FieldDef>

Returns an iterator over all the fields of the ADT that are visible from module.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'tcx> AdtDefExt<'tcx> for AdtDef<'tcx>

Source§

fn all_visible_fields( self, module: DefId, tcx: TyCtxt<'tcx>, ) -> impl Iterator<Item = &'tcx FieldDef>

Implementors§