Skip to content

Commit e00fc6e

Browse files
committed
---
yaml --- r: 1929 b: refs/heads/master c: ab8d200 h: refs/heads/master i: 1927: c3609c1 v: v3
1 parent 2a43661 commit e00fc6e

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
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: ae5ba62b240a4b3d1dacc062ba2f57d62b89d4f5
2+
refs/heads/master: ab8d200fb0d7e3dbd9fad4a87201908658dfc700

trunk/src/comp/front/creader.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,7 @@ fn kind_has_type_params(u8 kind_ch) -> bool {
548548
// FIXME: It'd be great if we had u8 char literals.
549549
if (kind_ch == ('c' as u8)) { ret false; }
550550
else if (kind_ch == ('f' as u8)) { ret true; }
551+
else if (kind_ch == ('y' as u8)) { ret true; }
551552
else if (kind_ch == ('o' as u8)) { ret true; }
552553
else if (kind_ch == ('t' as u8)) { ret true; }
553554
else if (kind_ch == ('m' as u8)) { ret false; }
@@ -582,12 +583,15 @@ fn lookup_def(session.session sess, int cnum, vec[ast.ident] path)
582583

583584
// FIXME: It'd be great if we had u8 char literals.
584585
auto def;
585-
if (kind_ch == ('c' as u8)) { def = ast.def_const(did); }
586-
else if (kind_ch == ('f' as u8)) { def = ast.def_fn(did); }
587-
else if (kind_ch == ('o' as u8)) { def = ast.def_obj(did); }
588-
else if (kind_ch == ('t' as u8)) { def = ast.def_ty(did); }
589-
else if (kind_ch == ('m' as u8)) { def = ast.def_mod(did); }
590-
else if (kind_ch == ('n' as u8)) { def = ast.def_native_mod(did); }
586+
if (kind_ch == ('c' as u8)) { def = ast.def_const(did); }
587+
else if (kind_ch == ('f' as u8)) { def = ast.def_fn(did); }
588+
else if (kind_ch == ('y' as u8)) { def = ast.def_ty(did); }
589+
else if (kind_ch == ('o' as u8)) { def = ast.def_obj(did); }
590+
else if (kind_ch == ('t' as u8)) {
591+
// We treat references to tags as references to types.
592+
def = ast.def_ty(did);
593+
} else if (kind_ch == ('m' as u8)) { def = ast.def_mod(did); }
594+
else if (kind_ch == ('n' as u8)) { def = ast.def_native_mod(did); }
591595
else if (kind_ch == ('v' as u8)) {
592596
auto tid = get_variant_tag_id(ebml_r);
593597
tid = tup(cnum, tid._1);

0 commit comments

Comments
 (0)