libsyntax: Forbid mutable vectors. rs=demuting

This commit is contained in:
Patrick Walton 2013-02-26 14:50:09 -08:00
parent 8d7e6ef772
commit 573a31dfa7
9 changed files with 31 additions and 61 deletions

View file

@ -9,10 +9,8 @@
// except according to those terms.
pub fn main() {
// Once cast_to_mut is removed, pick a better function to import
// for this test!
use vec::cast_to_mut;
log(debug, vec::len(cast_to_mut(~[1, 2])));
use vec::from_fn;
log(debug, vec::len(from_fn(2, |i| i)));
{
use vec::*;
log(debug, len(~[2]));