From 7ec171f6ae795050e571dad2c5122ded584e2505 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Fri, 8 Jun 2012 20:20:11 -0700 Subject: [PATCH] make a copy so vec is not living in mutable memory --- src/test/run-pass/reflect-visit-data.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/run-pass/reflect-visit-data.rs b/src/test/run-pass/reflect-visit-data.rs index dc5b6ea60e8..a38f27de9ce 100644 --- a/src/test/run-pass/reflect-visit-data.rs +++ b/src/test/run-pass/reflect-visit-data.rs @@ -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"];