5 extern crate "std" as std;
6 extern crate "native" as rt;
9 // Copyright 2014 The Rust Project Developers. See the COPYRIGHT
10 // file at the top-level directory of this distribution and at
11 // http://rust-lang.org/COPYRIGHT.
13 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
14 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
15 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
16 // option. This file may not be copied, modified, or distributed
17 // except according to those terms.
19 // pretty-compare-only
21 // pp-exact:issue-4264.pp
23 // #4264 fixed-length vector types
25 pub fn foo(_: [int, ..(3 as uint)]) { }
28 const FOO: uint = ((5u as uint) - (4u as uint) as uint);
29 let _: [(), ..(FOO as uint)] = ([(() as ())] as [(), ..1]);
31 let _: [(), ..(1u as uint)] = ([(() as ())] as [(), ..1]);
34 (((&((([(1i as int), (2 as int), (3 as int)] as [int, ..3])) as
35 [int, ..3]) as &[int, ..3]) as *const _ as *const [int, ..3])
36 as *const [int, ..(3u as uint)] as *const [int, ..3]);
42 static __STATIC_FMTSTR: [&'static str, ..(1u as uint)] =
43 ([("test" as &'static str)] as [&'static str, ..1]);
45 (&([] as [core::fmt::Argument<'_>, ..0]) as
46 &[core::fmt::Argument<'_>, ..0]);
49 ((::std::fmt::Arguments::new as
50 unsafe fn(&'static [&'static str], &'a [core::fmt::Argument<'a>]) -> core::fmt::Arguments<'a>)((__STATIC_FMTSTR
55 &[core::fmt::Argument<'_>, ..0]))
56 as core::fmt::Arguments<'_>)
57 } as core::fmt::Arguments<'_>);
66 ((::std::fmt::format as
67 fn(&core::fmt::Arguments<'_>) -> collections::string::String)((&(__args
69 core::fmt::Arguments<'_>)
71 &core::fmt::Arguments<'_>))
72 as collections::string::String)
74 } as collections::string::String);
76 pub type Foo = [int, ..(3u as uint)];
78 pub x: [int, ..(3u as uint)],
80 pub struct TupleBar([int, ..(4u as uint)]);
81 pub enum Baz { BazVariant([int, ..(5u as uint)]), }
82 pub fn id<T>(x: T) -> T { (x as T) }
85 ((id::<[int, ..(3u as uint)]> as
86 fn([int, ..3]) -> [int, ..3])(([(1 as int), (2 as int),
87 (3 as int)] as [int, ..3])) as