// -*- rust -*- fn main() { let vec[int] a = vec(1,2,3,4,5); let vec[int] b = vec(6,7,8,9,0); let vec[int] v = a + b; log v.(9); check(v.(0) == 1); check(v.(7) == 8); check(v.(9) == 0); } // -*- rust -*- fn main() { let vec[int] a = vec(1,2,3,4,5); let vec[int] b = vec(6,7,8,9,0); let vec[int] v = a + b; log v.(9); assert (v.(0) == 1); assert (v.(7) == 8); assert (v.(9) == 0); } // -*- rust -*- fn main() { let vec[int] a = vec(1,2,3,4,5); let vec[int] b = vec(6,7,8,9,0); let vec[int] v = a + b; log v.(9); check(v.(0) == 1); check(v.(7) == 8); check(v.(9) == 0); } // -*- rust -*- fn main() { let vec[int] a = vec(1,2,3,4,5); let vec[int] b = vec(6,7,8,9,0); let vec[int] v = a + b; log v.(9); assert (v.(0) == 1); assert (v.(7) == 8); assert (v.(9) == 0); } // -*- rust -*- fn main() { let vec[int] a = [1,2,3,4,5]; let vec[int] b = [6,7,8,9,0]; let vec[int] v = a + b; log v.(9); assert (v.(0) == 1); assert (v.(7) == 8); assert (v.(9) == 0); } // -*- rust -*- fn main() { let vec[int] a = [1, 2, 3, 4, 5]; let vec[int] b = [6, 7, 8, 9, 0]; let vec[int] v = a + b; log v.(9); assert (v.(0) == 1); assert (v.(7) == 8); assert (v.(9) == 0); } // -*- rust -*- fn main() { let a: vec[int] = [1, 2, 3, 4, 5]; let b: vec[int] = [6, 7, 8, 9, 0]; let v: vec[int] = a + b; log v.(9); assert (v.(0) == 1); assert (v.(7) == 8); assert (v.(9) == 0); } // -*- rust -*- fn main() { let a: [int] = ~[1, 2, 3, 4, 5]; let b: [int] = ~[6, 7, 8, 9, 0]; let v: [int] = a + b; log v.(9); assert (v.(0) == 1); assert (v.(7) == 8); assert (v.(9) == 0); } // -*- rust -*- fn main() { let a: [int] = ~[1, 2, 3, 4, 5]; let b: [int] = ~[6, 7, 8, 9, 0]; let v: [int] = a + b; log v.(9); assert (v.(0) == 1); assert (v.(7) == 8); assert (v.(9) == 0); } // -*- rust -*- fn main() { let a: [int] = [1, 2, 3, 4, 5]; let b: [int] = [6, 7, 8, 9, 0]; let v: [int] = a + b; log v[9]; assert (v[0] == 1); assert (v[7] == 8); assert (v[9] == 0); } // -*- rust -*- fn main() { let a: [int] = [1, 2, 3, 4, 5]; let b: [int] = [6, 7, 8, 9, 0]; let v: [int] = a + b; log_full(core::debug, v[9]); assert (v[0] == 1); assert (v[7] == 8); assert (v[9] == 0); } // -*- rust -*- fn main() { let a: [int] = [1, 2, 3, 4, 5]; let b: [int] = [6, 7, 8, 9, 0]; let v: [int] = a + b; log(debug, v[9]); assert (v[0] == 1); assert (v[7] == 8); assert (v[9] == 0); } // -*- rust -*- fn main() { let a: [int] = [1, 2, 3, 4, 5]; let b: [int] = [6, 7, 8, 9, 0]; let v: [int] = a + b; log(debug, v[9]); assert (v[0] == 1); assert (v[7] == 8); assert (v[9] == 0); } // -*- rust -*- fn main() { let a: [int]/~ = [1, 2, 3, 4, 5]/~; let b: [int]/~ = [6, 7, 8, 9, 0]/~; let v: [int]/~ = a + b; log(debug, v[9]); assert (v[0] == 1); assert (v[7] == 8); assert (v[9] == 0); } // -*- rust -*- fn main() { let a: ~[int] = ~[1, 2, 3, 4, 5]; let b: ~[int] = ~[6, 7, 8, 9, 0]; let v: ~[int] = a + b; log(debug, v[9]); assert (v[0] == 1); assert (v[7] == 8); assert (v[9] == 0); } // -*- rust -*- // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. fn main() { let a: ~[int] = ~[1, 2, 3, 4, 5]; let b: ~[int] = ~[6, 7, 8, 9, 0]; let v: ~[int] = a + b; log(debug, v[9]); assert (v[0] == 1); assert (v[7] == 8); assert (v[9] == 0); } // -*- rust -*- // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. pub fn main() { let a: ~[int] = ~[1, 2, 3, 4, 5]; let b: ~[int] = ~[6, 7, 8, 9, 0]; let v: ~[int] = a + b; log(debug, v[9]); assert (v[0] == 1); assert (v[7] == 8); assert (v[9] == 0); } // -*- rust -*- // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. pub fn main() { let a: ~[int] = ~[1, 2, 3, 4, 5]; let b: ~[int] = ~[6, 7, 8, 9, 0]; let v: ~[int] = a + b; log(debug, v[9]); fail_unless!((v[0] == 1)); fail_unless!((v[7] == 8)); fail_unless!((v[9] == 0)); } // -*- rust -*- // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. pub fn main() { let a: ~[int] = ~[1, 2, 3, 4, 5]; let b: ~[int] = ~[6, 7, 8, 9, 0]; let v: ~[int] = a + b; debug!(v[9]); fail_unless!((v[0] == 1)); fail_unless!((v[7] == 8)); fail_unless!((v[9] == 0)); } // -*- rust -*- // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. pub fn main() { let a: ~[int] = ~[1, 2, 3, 4, 5]; let b: ~[int] = ~[6, 7, 8, 9, 0]; let v: ~[int] = a + b; debug!(v[9]); assert!((v[0] == 1)); assert!((v[7] == 8)); assert!((v[9] == 0)); } // -*- rust -*- // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. pub fn main() { let a: ~[int] = ~[1, 2, 3, 4, 5]; let b: ~[int] = ~[6, 7, 8, 9, 0]; let v: ~[int] = a + b; debug!(v[9]); assert_eq!(v[0], 1); assert_eq!(v[7], 8); assert_eq!(v[9], 0); } // -*- rust -*- // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. pub fn main() { let a: ~[int] = ~[1, 2, 3, 4, 5]; let b: ~[int] = ~[6, 7, 8, 9, 0]; let v: ~[int] = a + b; info!(v[9]); assert_eq!(v[0], 1); assert_eq!(v[7], 8); assert_eq!(v[9], 0); } // -*- rust -*- // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. pub fn main() { let a: ~[int] = ~[1, 2, 3, 4, 5]; let b: ~[int] = ~[6, 7, 8, 9, 0]; let v: ~[int] = a + b; info2!("{}", v[9]); assert_eq!(v[0], 1); assert_eq!(v[7], 8); assert_eq!(v[9], 0); } // -*- rust -*- // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. pub fn main() { let a: ~[int] = ~[1, 2, 3, 4, 5]; let b: ~[int] = ~[6, 7, 8, 9, 0]; let v: ~[int] = a + b; info!("{}", v[9]); assert_eq!(v[0], 1); assert_eq!(v[7], 8); assert_eq!(v[9], 0); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. pub fn main() { let a: ~[int] = ~[1, 2, 3, 4, 5]; let b: ~[int] = ~[6, 7, 8, 9, 0]; let v: ~[int] = a + b; info!("{}", v[9]); assert_eq!(v[0], 1); assert_eq!(v[7], 8); assert_eq!(v[9], 0); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. pub fn main() { let a: ~[int] = ~[1, 2, 3, 4, 5]; let b: ~[int] = ~[6, 7, 8, 9, 0]; let v: ~[int] = a + b; println!("{}", v[9]); assert_eq!(v[0], 1); assert_eq!(v[7], 8); assert_eq!(v[9], 0); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. use std::vec; pub fn main() { let a: Vec<int> = vec!(1, 2, 3, 4, 5); let b: Vec<int> = vec!(6, 7, 8, 9, 0); let v: Vec<int> = vec::append(a, b.as_slice()); println!("{}", v[9]); assert_eq!(*v.get(0), 1); assert_eq!(*v.get(7), 8); assert_eq!(*v.get(9), 0); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. use std::vec; pub fn main() { let a: Vec<int> = vec!(1, 2, 3, 4, 5); let b: Vec<int> = vec!(6, 7, 8, 9, 0); let v: Vec<int> = vec::append(a, b.as_slice()); println!("{}", *v.get(9)); assert_eq!(*v.get(0), 1); assert_eq!(*v.get(7), 8); assert_eq!(*v.get(9), 0); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. use std::vec; pub fn main() { let a: Vec<int> = vec!(1, 2, 3, 4, 5); let b: Vec<int> = vec!(6, 7, 8, 9, 0); let v: Vec<int> = a.append(b.as_slice()); println!("{}", *v.get(9)); assert_eq!(*v.get(0), 1); assert_eq!(*v.get(7), 8); assert_eq!(*v.get(9), 0); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. use std::vec; pub fn main() { let a: Vec<int> = vec!(1, 2, 3, 4, 5); let b: Vec<int> = vec!(6, 7, 8, 9, 0); let mut v: Vec<int> = a; v.push_all(b.as_slice()); println!("{}", v[9]); assert_eq!(v[0], 1); assert_eq!(v[7], 8); assert_eq!(v[9], 0); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. use std::vec; pub fn main() { let a: Vec<int> = vec!(1, 2, 3, 4, 5); let b: Vec<int> = vec!(6, 7, 8, 9, 0); let mut v: Vec<int> = a; v.push_all(&b); println!("{}", v[9]); assert_eq!(v[0], 1); assert_eq!(v[7], 8); assert_eq!(v[9], 0); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. #![feature(collections)] use std::vec; pub fn main() { let a: Vec<int> = vec!(1, 2, 3, 4, 5); let b: Vec<int> = vec!(6, 7, 8, 9, 0); let mut v: Vec<int> = a; v.push_all(&b); println!("{}", v[9]); assert_eq!(v[0], 1); assert_eq!(v[7], 8); assert_eq!(v[9], 0); } // Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. #![feature(collections)] use std::vec; pub fn main() { let a: Vec<isize> = vec!(1, 2, 3, 4, 5); let b: Vec<isize> = vec!(6, 7, 8, 9, 0); let mut v: Vec<isize> = a; v.push_all(&b); println!("{}", v[9]); assert_eq!(v[0], 1); assert_eq!(v[7], 8); assert_eq!(v[9], 0); }