]> git.lizzy.rs Git - rust.git/commitdiff
Add a returns_non_ty_var predicate
authorTim Chevalier <chevalier@alum.wellesley.edu>
Fri, 16 Sep 2011 20:03:26 +0000 (13:03 -0700)
committerTim Chevalier <chevalier@alum.wellesley.edu>
Fri, 16 Sep 2011 20:06:31 +0000 (13:06 -0700)
which just calls non_ty_var on the return type of t, assuming t is
a function type.

src/comp/middle/trans_common.rs

index 32d0266c7e90537fdc614b976898c29c68bc9e97..847504a39209667ae17f44107bca8b886877e099 100644 (file)
@@ -857,6 +857,10 @@ fn C_shape(ccx: @crate_ctxt, bytes: [u8]) -> ValueRef {
     }
 }
 
+pure fn returns_non_ty_var(cx: @crate_ctxt, t: ty::t) -> bool {
+    non_ty_var(cx, ty::ty_fn_ret(cx.tcx, t))
+}
+
 //
 // Local Variables:
 // mode: rust