aboutsummaryrefslogtreecommitdiff
path: root/src/comp/middle/ty.rs
diff options
context:
space:
mode:
authorPatrick Walton <[email protected]>2011-05-13 17:53:42 -0700
committerPatrick Walton <[email protected]>2011-05-13 17:55:07 -0700
commitef75860a0a72f79f97216f8aaa5b388d98da6480 (patch)
tree48a4b22a2dd685c05c310f5a647186bca59582d8 /src/comp/middle/ty.rs
parent'with' no longer a token; whitespace police. (diff)
downloadrust-ef75860a0a72f79f97216f8aaa5b388d98da6480.tar.xz
rust-ef75860a0a72f79f97216f8aaa5b388d98da6480.zip
rustc: Write nil types into the node type table wherever plain_ann() is usedHEADmaster
Diffstat (limited to 'src/comp/middle/ty.rs')
-rw-r--r--src/comp/middle/ty.rs6
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) {