diff options
Diffstat (limited to 'src/comp/middle/ty.rs')
| -rw-r--r-- | src/comp/middle/ty.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/comp/middle/ty.rs b/src/comp/middle/ty.rs index 75d8f08c..f28a8d62 100644 --- a/src/comp/middle/ty.rs +++ b/src/comp/middle/ty.rs @@ -1492,6 +1492,12 @@ fn triv_ann(uint node_id, t typ) -> ast::ann { ret ast::ann_type(node_id, typ, none[vec[t]], none[@ts_ann]); } +// Creates a nil type annotation. +fn plain_ann(uint node_id, ctxt tcx) -> ast::ann { + ret ast::ann_type(node_id, mk_nil(tcx), none[vec[ty::t]], none[@ts_ann]); +} + + // Returns the number of distinct type parameters in the given type. fn count_ty_params(ctxt cx, t ty) -> uint { fn counter(ctxt cx, @mutable vec[uint] param_indices, t ty) { |