Skip to content

Commit 4dace93

Browse files
committed
---
yaml --- r: 2552 b: refs/heads/master c: 594c70f h: refs/heads/master v: v3
1 parent c118fe2 commit 4dace93

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: f77c5ba512687835fac4f0f1273c855d6d416c37
2+
refs/heads/master: 594c70f788734813e63991a83c2693b9d4f2f8bf

trunk/src/comp/middle/ty.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1665,6 +1665,26 @@ fn pat_ty(&ctxt cx, &node_type_table ntt, &@ast::pat pat) -> t {
16651665
fail; // not reached
16661666
}
16671667

1668+
fn item_ann(&@ast::item it) -> ast::ann {
1669+
alt (it.node) {
1670+
case (ast::item_const(_,_,_,_,?a)) { ret a; }
1671+
case (ast::item_fn(_,_,_,_,?a)) { ret a; }
1672+
case (ast::item_mod(_,_,_)) {
1673+
log_err "a module was passed to item_ann(), " +
1674+
"but modules haven't annotations";
1675+
fail;
1676+
}
1677+
case (ast::item_native_mod(_,_,_)) {
1678+
log_err "a native module was passed to item_ann(), " +
1679+
"but native modules haven't annotations";
1680+
fail;
1681+
}
1682+
case (ast::item_ty(_,_,_,_,?a)) { ret a; }
1683+
case (ast::item_tag(_,_,_,_,?a)) { ret a; }
1684+
case (ast::item_obj(_,_,_,_,?a)) { ret a; }
1685+
}
1686+
}
1687+
16681688
fn expr_ann(&@ast::expr e) -> ast::ann {
16691689
alt (e.node) {
16701690
case (ast::expr_vec(_,_,?a)) { ret a; }

0 commit comments

Comments
 (0)