2 use std::prelude::v1::*;
5 // Copyright 2014 The Rust Project Developers. See the COPYRIGHT
6 // file at the top-level directory of this distribution and at
7 // http://rust-lang.org/COPYRIGHT.
9 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
10 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
11 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
12 // option. This file may not be copied, modified, or distributed
13 // except according to those terms.
15 // pretty-compare-only
16 // pretty-mode:hir,typed
17 // pp-exact:issue-4264.pp
19 // #4264 fixed-length vector types
21 pub fn foo(_: [i32; (3 as usize)]) ({ } as ())
24 const FOO: usize = ((5 as usize) - (4 as usize) as usize);
25 let _: [(); (FOO as usize)] = ([(() as ())] as [(); 1]);
27 let _: [(); (1 as usize)] = ([(() as ())] as [(); 1]);
30 (((&([(1 as i32), (2 as i32), (3 as i32)] as [i32; 3])
31 as &[i32; 3]) as *const _ as *const [i32; 3]) as
32 *const [i32; (3 as usize)] as *const [i32; 3]);
43 for<'r> fn(std::fmt::Arguments<'r>) -> std::string::String {std::fmt::format})(((<::fmt::Arguments>::new_v1
45 fn(&[&str], &[std::fmt::ArgumentV1<'_>]) -> std::fmt::Arguments<'_> {std::fmt::Arguments<'_>::new_v1})((&([("test"
60 [std::fmt::ArgumentV1<'_>; 0]),
63 [std::fmt::ArgumentV1<'_>; 0])
65 &[std::fmt::ArgumentV1<'_>; 0]))
67 std::fmt::Arguments<'_>))
68 as std::string::String);
70 pub type Foo = [i32; (3 as usize)];
72 pub x: [i32; (3 as usize)],
74 pub struct TupleBar([i32; (4 as usize)]);
75 pub enum Baz { BazVariant([i32; (5 as usize)]), }
76 pub fn id<T>(x: T) -> T ({ (x as T) } as T)
79 ((id::<[i32; (3 as usize)]> as
80 fn([i32; 3]) -> [i32; 3] {id::<[i32; 3]>})(([(1