Function rustc_lint::types::get_nullable_type
source · fn get_nullable_type<'tcx>(
cx: &LateContext<'tcx>,
ty: Ty<'tcx>
) -> Option<Ty<'tcx>>
Expand description
Given a non-null scalar (or transparent) type ty
, return the nullable version of that type.
If the type passed in was not scalar, returns None.