diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2012-08-06 18:54:20 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2012-08-06 18:55:24 -0700 |
| commit | 60f47eabe2ef2730b98713dee2b5fd59513e8c6c (patch) | |
| tree | cf491427dd1bfac38de4fd93d934702db9669fda /src/rustc/metadata | |
| parent | c0f7ed68e235b61a2e9710864a2283f554bb470d (diff) | |
| download | rust-60f47eabe2ef2730b98713dee2b5fd59513e8c6c.tar.gz rust-60f47eabe2ef2730b98713dee2b5fd59513e8c6c.zip | |
rustc: Parse and stub (broken) typechecking for bounded function types
Diffstat (limited to 'src/rustc/metadata')
| -rw-r--r-- | src/rustc/metadata/tydecode.rs | 5 | ||||
| -rw-r--r-- | src/rustc/metadata/tyencode.rs | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/rustc/metadata/tydecode.rs b/src/rustc/metadata/tydecode.rs index a834147af96..e66d0cef71b 100644 --- a/src/rustc/metadata/tydecode.rs +++ b/src/rustc/metadata/tydecode.rs @@ -362,6 +362,7 @@ fn parse_purity(c: char) -> purity { fn parse_ty_fn(st: @pstate, conv: conv_did) -> ty::fn_ty { let proto = parse_proto(next(st)); let purity = parse_purity(next(st)); + let bounds = parse_bounds(st, conv); assert (next(st) == '['); let mut inputs: ~[ty::arg] = ~[]; while peek(st) != ']' { @@ -377,8 +378,8 @@ fn parse_ty_fn(st: @pstate, conv: conv_did) -> ty::fn_ty { } st.pos += 1u; // eat the ']' let (ret_style, ret_ty) = parse_ret_ty(st, conv); - return {purity: purity, proto: proto, inputs: inputs, output: ret_ty, - ret_style: ret_style}; + return {purity: purity, proto: proto, bounds: bounds, inputs: inputs, + output: ret_ty, ret_style: ret_style}; } diff --git a/src/rustc/metadata/tyencode.rs b/src/rustc/metadata/tyencode.rs index 458dc149802..9e67157b181 100644 --- a/src/rustc/metadata/tyencode.rs +++ b/src/rustc/metadata/tyencode.rs @@ -337,6 +337,7 @@ fn enc_purity(w: io::writer, p: purity) { fn enc_ty_fn(w: io::writer, cx: @ctxt, ft: ty::fn_ty) { enc_proto(w, ft.proto); enc_purity(w, ft.purity); + enc_bounds(w, cx, ft.bounds); w.write_char('['); for ft.inputs.each |arg| { enc_mode(w, cx, arg.mode); |
