fn ty_to_res<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> Option<Res>
Convert a Ty to a Res, where possible.
This is used for resolving type aliases.