From 54587bdccb7b6771cfc704a30fc0ef2c65824a15 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Wed, 16 Mar 2011 14:58:02 -0700 Subject: Switch all vases of vec += elt to vec += vec. Prohibit former in rustboot. Tweak std lib vec fns in process. --- src/lib/std.rc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/lib/std.rc') diff --git a/src/lib/std.rc b/src/lib/std.rc index a339fd85..7a3cdbb2 100644 --- a/src/lib/std.rc +++ b/src/lib/std.rc @@ -34,6 +34,17 @@ auth _str = unsafe; auth _vec = unsafe; auth _task = unsafe; + +// FIXME: impure on these will infect caller in a way that is totally +// beyond reason, if the caller's mutated-argument doesn't escape; +// 'impure' needs work. +auth _str.unshift_byte = impure; +auth _str.shift_byte = impure; +auth _str.pop_byte = impure; +auth _vec.shift = impure; +auth _vec.unshift = impure; +auth _vec.pop = impure; + auth dbg = unsafe; auth _uint.next_power_of_two = unsafe; -- cgit v1.2.3