make a copy so vec is not living in mutable memory
This commit is contained in:
parent
013fc92423
commit
7ec171f6ae
@ -295,7 +295,7 @@ fn main() {
|
|||||||
let vv = v as intrinsic::ty_visitor;
|
let vv = v as intrinsic::ty_visitor;
|
||||||
intrinsic::visit_ty::<(int,int,int,bool,bool)>(vv);
|
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));
|
io::println(#fmt("val: %s", s));
|
||||||
}
|
}
|
||||||
assert u.vals == ["1", "2", "3", "true", "false"];
|
assert u.vals == ["1", "2", "3", "true", "false"];
|
||||||
|
Loading…
Reference in New Issue
Block a user