1 // Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
15 fn foo(_: [&Foo; 2]) {}
16 fn foos(_: &[&Foo]) {}
17 fn foog<T>(_: &[T], _: &[T]) {}
19 fn bar(_: [Box<Foo>; 2]) {}
20 fn bars(_: &[Box<Foo>]) {}
23 let x: [&Foo; 2] = [&1i, &2i];
28 let x: [&Foo; 2] = [r; 2];
32 let x: &[&Foo] = &[&1i, &2i];
36 let x: &[&Foo] = &[&1i, &2i];
40 let x: [Box<Foo>; 2] = [box 1i, box 2i];
42 bar([box 1i, box 2i]);
44 let x: &[Box<Foo>] = &[box 1i, box 2i];
46 bars(&[box 1i, box 2i]);
48 let x: &[Box<Foo>] = &[box 1i, box 2i];
61 let x: [&Foo; 2] = [&1i, &2i];
73 let r: [&Foo; 2] = [r; 2];
77 let x: [&Foo; 2] = [&1i, &2i];
83 t: &'a [Box<Foo+'static>]
88 let x: [Box<Foo>; 2] = [box 1i, box 2i];