@@ -65,6 +65,11 @@ impure fn parse_ty_str(str rep, str_def sd) -> @ty.t {
65
65
auto len = _str. byte_len ( rep) ;
66
66
auto st = @rec ( rep=rep, mutable pos=0 u, len=len) ;
67
67
auto result = parse_ty ( st, sd) ;
68
+ if ( st. pos != len) {
69
+ log "parse_ty_str: incomplete parse, stopped at byte "
70
+ + _uint. to_str ( st. pos , 10 u) + " of "
71
+ + _uint. to_str ( len, 10 u) + " in str '" + rep + "'" ;
72
+ }
68
73
check ( st. pos == len) ;
69
74
ret result;
70
75
}
@@ -191,6 +196,7 @@ impure fn parse_sty(@pstate st, str_def sd) -> ty.sty {
191
196
inputs=func. _0 ,
192
197
output=func. _1 ) ) ;
193
198
}
199
+ st. pos += 1 u;
194
200
ret ty. ty_obj ( methods) ;
195
201
}
196
202
case ( 'X' ) { ret ty. ty_var ( parse_int ( st) ) ; }
@@ -544,6 +550,7 @@ fn kind_has_type_params(u8 kind_ch) -> bool {
544
550
// FIXME: It'd be great if we had u8 char literals.
545
551
if ( kind_ch == ( 'c' as u8 ) ) { ret false ; }
546
552
else if ( kind_ch == ( 'f' as u8 ) ) { ret true; }
553
+ else if ( kind_ch == ( 'F' as u8 ) ) { ret true ; }
547
554
else if ( kind_ch == ( 'y' as u8 ) ) { ret true; }
548
555
else if ( kind_ch == ( 'o' as u8 ) ) { ret true; }
549
556
else if ( kind_ch == ( 't' as u8 ) ) { ret true; }
@@ -581,6 +588,7 @@ fn lookup_def(session.session sess, int cnum, vec[ast.ident] path)
581
588
auto def;
582
589
if ( kind_ch == ( 'c' as u8 ) ) { def = ast. def_const( did) ; }
583
590
else if ( kind_ch == ( 'f' as u8 ) ) { def = ast. def_fn( did) ; }
591
+ else if ( kind_ch == ( 'F' as u8 ) ) { def = ast. def_native_fn( did) ; }
584
592
else if ( kind_ch == ( 'y' as u8 ) ) { def = ast. def_ty( did) ; }
585
593
else if ( kind_ch == ( 'o' as u8 ) ) { def = ast. def_obj( did) ; }
586
594
else if ( kind_ch == ( 't' as u8 ) ) {
0 commit comments