We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
ast_ty_to_prim_ty
1 parent 1ad1b7d commit e184c2dCopy full SHA for e184c2d
src/librustc/middle/astconv_util.rs
@@ -60,6 +60,8 @@ pub fn prim_ty_to_ty<'tcx>(tcx: &ty::ctxt<'tcx>,
60
}
61
62
63
+/// If a type in the AST is a primitive type, return the ty::Ty corresponding
64
+/// to it.
65
pub fn ast_ty_to_prim_ty<'tcx>(tcx: &ty::ctxt<'tcx>, ast_ty: &ast::Ty)
66
-> Option<Ty<'tcx>> {
67
if let ast::TyPath(None, ref path) = ast_ty.node {
0 commit comments