diff options
| author | Patrick Walton <[email protected]> | 2011-05-13 17:53:42 -0700 |
|---|---|---|
| committer | Patrick Walton <[email protected]> | 2011-05-13 17:55:07 -0700 |
| commit | ef75860a0a72f79f97216f8aaa5b388d98da6480 (patch) | |
| tree | 48a4b22a2dd685c05c310f5a647186bca59582d8 /src/comp/middle/ty.rs | |
| parent | 'with' no longer a token; whitespace police. (diff) | |
| download | rust-ef75860a0a72f79f97216f8aaa5b388d98da6480.tar.xz rust-ef75860a0a72f79f97216f8aaa5b388d98da6480.zip | |
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) { |