We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f77c5ba commit 594c70fCopy full SHA for 594c70f
src/comp/middle/ty.rs
@@ -1665,6 +1665,26 @@ fn pat_ty(&ctxt cx, &node_type_table ntt, &@ast::pat pat) -> t {
1665
fail; // not reached
1666
}
1667
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
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
+
1688
fn expr_ann(&@ast::expr e) -> ast::ann {
1689
alt (e.node) {
1690
case (ast::expr_vec(_,_,?a)) { ret a; }
0 commit comments