aboutsummaryrefslogtreecommitdiff
path: root/src/boot
diff options
context:
space:
mode:
authorLindsey Kuper <[email protected]>2011-03-18 12:32:54 -0700
committerLindsey Kuper <[email protected]>2011-03-18 12:32:54 -0700
commit6dee1ac161a22a4bc1e49c5dac3c7bbba1ff97f0 (patch)
treef423d576e977e7a258f09e50e5a51702525782e2 /src/boot
parentIgnore emacs autosave files. (diff)
parentrustc: Add a span_unimpl() for debugging (diff)
downloadrust-6dee1ac161a22a4bc1e49c5dac3c7bbba1ff97f0.tar.xz
rust-6dee1ac161a22a4bc1e49c5dac3c7bbba1ff97f0.zip
Merge branch 'master' of git://github.com/graydon/rust
Diffstat (limited to 'src/boot')
-rw-r--r--src/boot/fe/pexp.ml16
-rw-r--r--src/boot/me/type.ml4
2 files changed, 15 insertions, 5 deletions
diff --git a/src/boot/fe/pexp.ml b/src/boot/fe/pexp.ml
index a5f3759a..c4dcfe1d 100644
--- a/src/boot/fe/pexp.ml
+++ b/src/boot/fe/pexp.ml
@@ -159,7 +159,14 @@ and parse_effect (ps:pstate) : Ast.effect =
and parse_mutability (ps:pstate) : Ast.mutability =
match peek ps with
- MUTABLE -> bump ps; Ast.MUT_mutable
+ MUTABLE ->
+ begin
+ (* HACK: ignore "mutable?" *)
+ bump ps;
+ match peek ps with
+ QUES -> bump ps; Ast.MUT_immutable
+ | _ -> Ast.MUT_mutable
+ end
| _ -> Ast.MUT_immutable
and parse_ty_fn
@@ -310,7 +317,12 @@ and parse_atomic_ty (ps:pstate) : Ast.ty =
| MUTABLE ->
bump ps;
- Ast.TY_mutable (parse_ty ps)
+ begin
+ (* HACK: ignore "mutable?" *)
+ match peek ps with
+ QUES -> bump ps; parse_ty ps
+ | _ -> Ast.TY_mutable (parse_ty ps)
+ end
| LPAREN ->
begin
diff --git a/src/boot/me/type.ml b/src/boot/me/type.ml
index 87e8e4c1..72bdd404 100644
--- a/src/boot/me/type.ml
+++ b/src/boot/me/type.ml
@@ -993,8 +993,7 @@ let check_block (cx:Semant.ctxt) : (fn_ctx -> Ast.block -> unit) =
let src_ty = check_atom ~deref:true src in
let dst_ty = check_lval dst in
match fundamental_ty dst_ty, fundamental_ty src_ty with
- Ast.TY_vec elt1, Ast.TY_vec elt2
- | Ast.TY_vec elt1, elt2 ->
+ Ast.TY_vec elt1, Ast.TY_vec elt2 ->
if elt1 = elt2
then ()
else
@@ -1002,7 +1001,6 @@ let check_block (cx:Semant.ctxt) : (fn_ctx -> Ast.block -> unit) =
"mismatched types in vec-append: %s += %s"
(pretty_ty_str dst_ty)
(pretty_ty_str src_ty)
- | Ast.TY_str, (Ast.TY_mach Common.TY_u8)
| Ast.TY_str, Ast.TY_str -> ()
| _ ->
infer_lval src_ty dst;