rustc_hir_typeck

Function diagnostic_only_typeck

source
pub(crate) fn diagnostic_only_typeck<'tcx>(
    tcx: TyCtxt<'tcx>,
    def_id: LocalDefId,
) -> &'tcx TypeckResults<'tcx>
Expand description

Used only to get TypeckResults for type inference during error recovery. Currently only used for type inference of statics and consts to avoid type cycle errors.