make a copy so vec is not living in mutable memory

This commit is contained in:
Niko Matsakis 2012-06-08 20:20:11 -07:00
parent 013fc92423
commit 7ec171f6ae

View File

@ -295,7 +295,7 @@ fn main() {
let vv = v as intrinsic::ty_visitor;
intrinsic::visit_ty::<(int,int,int,bool,bool)>(vv);
for u.vals.each {|s|
for (copy u.vals).each {|s|
io::println(#fmt("val: %s", s));
}
assert u.vals == ["1", "2", "3", "true", "false"];