fn main() {
let vec[int] v = vec(1,2,3,4,5);
auto v2 = v.(1,2);
check (v2.(0) == 2);
check (v2.(1) == 3);
}
// xfail-boot
// xfail-boot
// xfail-stage0
fn main() {
let vec[int] v = vec(1,2,3,4,5);
auto v2 = v.(1,2);
check (v2.(0) == 2);
check (v2.(1) == 3);
}
// xfail-boot
// xfail-boot
// xfail-stage0
fn main() {
let vec[int] v = vec(1,2,3,4,5);
auto v2 = v.(1,2);
assert (v2.(0) == 2);
assert (v2.(1) == 3);
}
// xfail-boot
// xfail-boot
// xfail-stage0
fn main() {
let vec[int] v = vec(1,2,3,4,5);
auto v2 = v.(1,2);
check (v2.(0) == 2);
check (v2.(1) == 3);
}
// xfail-boot
// xfail-boot
// xfail-stage0
fn main() {
let vec[int] v = vec(1,2,3,4,5);
auto v2 = v.(1,2);
assert (v2.(0) == 2);
assert (v2.(1) == 3);
}
// xfail-boot
// xfail-boot
// xfail-stage0
// xfail-stage1
// xfail-stage2
fn main() {
let vec[int] v = vec(1,2,3,4,5);
auto v2 = v.(1,2);
assert (v2.(0) == 2);
assert (v2.(1) == 3);
}
// xfail-stage0
// xfail-stage1
// xfail-stage2
fn main() {
let vec[int] v = vec(1,2,3,4,5);
auto v2 = v.(1,2);
assert (v2.(0) == 2);
assert (v2.(1) == 3);
}
// xfail-stage0
// xfail-stage1
// xfail-stage2
fn main() {
let vec[int] v = [1,2,3,4,5];
auto v2 = v.(1,2);
assert (v2.(0) == 2);
assert (v2.(1) == 3);
}
// xfail-stage0
// xfail-stage1
// xfail-stage2
// xfail-stage3
fn main() {
let vec[int] v = [1,2,3,4,5];
auto v2 = v.(1,2);
assert (v2.(0) == 2);
assert (v2.(1) == 3);
}
./src/test/run-pass/vec-slice.rs:7:16:7:17: [1;31merror:[0m expecting ), found ,
./src/test/run-pass/vec-slice.rs:7 auto v2 = v.(1,2);
^
rt: ---
rt: f00e:main:main: upcall fail 'explicit failure', src/comp/syntax/parse/parser.rs:112
rt: f00e:main: domain main @0xa73404c root task failed
// xfail-stage0
// xfail-stage1
// xfail-stage2
// xfail-stage3
fn main() {
let vec[int] v = [1,2,3,4,5];
auto v2 = v.(1,2);
assert (v2.(0) == 2);
assert (v2.(1) == 3);
}
// xfail-stage1
// xfail-stage2
// xfail-stage3
fn main() {
let vec[int] v = [1,2,3,4,5];
auto v2 = v.(1,2);
assert (v2.(0) == 2);
assert (v2.(1) == 3);
}
// xfail-stage1
// xfail-stage2
// xfail-stage3
fn main() {
let vec<int> v = [1,2,3,4,5];
auto v2 = v.(1,2);
assert (v2.(0) == 2);
assert (v2.(1) == 3);
}
// xfail-test
fn main() {
let vec<int> v = [1,2,3,4,5];
auto v2 = v.(1,2);
assert (v2.(0) == 2);
assert (v2.(1) == 3);
}
// xfail-stage1
// xfail-stage2
// xfail-stage3
fn main() {
let vec<int> v = [1,2,3,4,5];
auto v2 = v.(1,2);
assert (v2.(0) == 2);
assert (v2.(1) == 3);
}
// xfail-test
fn main() {
let vec<int> v = [1,2,3,4,5];
auto v2 = v.(1,2);
assert (v2.(0) == 2);
assert (v2.(1) == 3);
}
fn main() {
let v = [1,2,3,4,5];
let v2 = vec::slice(v, 1, 3);
assert (v2[0] == 2);
assert (v2[1] == 3);
}
fn main() {
let v = [1,2,3,4,5]/~;
let v2 = vec::slice(v, 1, 3);
assert (v2[0] == 2);
assert (v2[1] == 3);
}
fn main() {
let v = ~[1,2,3,4,5];
let v2 = vec::slice(v, 1, 3);
assert (v2[0] == 2);
assert (v2[1] == 3);
}
// 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 v = ~[1,2,3,4,5];
let v2 = vec::slice(v, 1, 3);
assert (v2[0] == 2);
assert (v2[1] == 3);
}
// 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 v = ~[1,2,3,4,5];
let v2 = vec::slice(v, 1, 3);
assert (v2[0] == 2);
assert (v2[1] == 3);
}
// 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 v = ~[1,2,3,4,5];
let v2 = vec::slice(v, 1, 3);
fail_unless!((v2[0] == 2));
fail_unless!((v2[1] == 3));
}
// 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 v = ~[1,2,3,4,5];
let v2 = vec::slice(v, 1, 3);
assert!((v2[0] == 2));
assert!((v2[1] == 3));
}
// 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 v = ~[1,2,3,4,5];
let v2 = vec::slice(v, 1, 3);
assert_eq!(v2[0], 2);
assert_eq!(v2[1], 3);
}
// 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 v = ~[1,2,3,4,5];
let v2 = vec::slice(v, 1, 3);
assert_eq!(v2[0], 2);
assert_eq!(v2[1], 3);
}
// 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 v = ~[1,2,3,4,5];
let v2 = v.slice(1, 3);
assert_eq!(v2[0], 2);
assert_eq!(v2[1], 3);
}
// 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 v = vec!(1,2,3,4,5);
let v2 = v.slice(1, 3);
assert_eq!(v2[0], 2);
assert_eq!(v2[1], 3);
}
// 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 v = vec!(1i,2,3,4,5);
let v2 = v.slice(1, 3);
assert_eq!(v2[0], 2);
assert_eq!(v2[1], 3);
}
// 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 v = vec!(1i,2,3,4,5);
let v2 = &v[1..3];
assert_eq!(v2[0], 2);
assert_eq!(v2[1], 3);
}
// 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 v = vec![1,2,3,4,5];
let v2 = &v[1..3];
assert_eq!(v2[0], 2);
assert_eq!(v2[1], 3);
}
// 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.
// pretty-expanded FIXME #23616
pub fn main() {
let v = vec![1,2,3,4,5];
let v2 = &v[1..3];
assert_eq!(v2[0], 2);
assert_eq!(v2[1], 3);
}
// 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 v = vec![1,2,3,4,5];
let v2 = &v[1..3];
assert_eq!(v2[0], 2);
assert_eq!(v2[1], 3);
}