clippy_utils::ty

Function get_field_by_name

source
pub fn get_field_by_name<'tcx>(
    tcx: TyCtxt<'tcx>,
    ty: Ty<'tcx>,
    name: Symbol,
) -> Option<Ty<'tcx>>
Expand description

Get’s the type of a field by name.