5 extern crate "std" as std;
7 use std::prelude::v1::*;
8 // Copyright 2014 The Rust Project Developers. See the COPYRIGHT
9 // file at the top-level directory of this distribution and at
10 // http://rust-lang.org/COPYRIGHT.
12 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
13 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
14 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
15 // option. This file may not be copied, modified, or distributed
16 // except according to those terms.
18 // pretty-compare-only
20 // pp-exact:issue-4264.pp
22 // #4264 fixed-length vector types
24 pub fn foo(_: [int; (3 as uint)]) { }
27 const FOO: uint = ((5u as uint) - (4u as uint) as uint);
28 let _: [(); (FOO as uint)] = ([(() as ())] as [(); 1]);
30 let _: [(); (1u as uint)] = ([(() as ())] as [(); 1]);
33 (((&((([(1i as int), (2 as int), (3 as int)] as [int; 3])) as
34 [int; 3]) as &[int; 3]) as *const _ as *const [int; 3]) as
35 *const [int; (3u as uint)] as *const [int; 3]);
45 ((::std::fmt::format as
46 fn(core::fmt::Arguments<'_>) -> collections::string::String {std::fmt::format})(((::std::fmt::Arguments::new
48 fn(&[&str], &[core::fmt::Argument<'_>]) -> core::fmt::Arguments<'_> {core::fmt::Arguments<'a>::new})(({
51 static __STATIC_FMTSTR:
52 &'static [&'static str]
60 &'static [&'static str; 1]);
63 &'static [&'static str])
75 [core::fmt::Argument<'_>; 0]),
78 [core::fmt::Argument<'_>; 0])
80 &[core::fmt::Argument<'_>; 0]))
82 core::fmt::Arguments<'_>))
83 as collections::string::String);
85 pub type Foo = [int; (3u as uint)];
87 pub x: [int; (3u as uint)],
89 pub struct TupleBar([int; (4u as uint)]);
90 pub enum Baz { BazVariant([int; (5u as uint)]), }
91 pub fn id<T>(x: T) -> T { (x as T) }
94 ((id::<[int; (3u as uint)]> as
95 fn([int; 3]) -> [int; 3] {id})(([(1 as int), (2 as int),
96 (3 as int)] as [int; 3])) as