rustc_hir_typeck::intrinsicck

Function unpack_option_like

Source
fn unpack_option_like<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> Ty<'tcx>
Expand description

If the type is Option<T>, it will return T, otherwise the type itself. Works on most Option-like types.