aboutsummaryrefslogtreecommitdiff
path: root/src/boot/me
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-07-01 21:20:30 -0700
committerGraydon Hoare <[email protected]>2010-07-01 21:20:30 -0700
commit01cfcfab1356407f98081e565644d4e3047fe36c (patch)
treefac3a36cecca90f001bd204dad1d38cc178d1668 /src/boot/me
parentRetire defunct copy_ty in favour of trans_copy_ty, which invokes the same log... (diff)
downloadrust-01cfcfab1356407f98081e565644d4e3047fe36c.tar.xz
rust-01cfcfab1356407f98081e565644d4e3047fe36c.zip
Strip outer 'mutable' off slot when deciding if pred can apply.
Diffstat (limited to 'src/boot/me')
-rw-r--r--src/boot/me/typestate.ml5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/boot/me/typestate.ml b/src/boot/me/typestate.ml
index 764fdc96..2c0c4b15 100644
--- a/src/boot/me/typestate.ml
+++ b/src/boot/me/typestate.ml
@@ -68,9 +68,10 @@ let determine_constr_key
if referent_is_slot cx aid
then
if type_has_state
- (slot_ty (get_slot cx aid))
+ (strip_mutable_or_constrained_ty
+ (slot_ty (get_slot cx aid)))
then err (Some aid)
- "predicate applied to slot of mutable type"
+ "predicate applied to slot of state type"
else aid
else
(* Items are always constant, they're ok.