]> git.proxmox.com Git - rustc.git/blob - tests/pretty/issue-4264.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / pretty / issue-4264.rs
1 // pretty-compare-only
2 // pretty-mode:hir,typed
3 // pp-exact:issue-4264.pp
4
5 // #4264 fixed-length vector types
6
7 pub fn foo(_: [i32; 3]) {}
8
9 pub fn bar() {
10 const FOO: usize = 5 - 4;
11 let _: [(); FOO] = [()];
12
13 let _ : [(); 1] = [()];
14
15 let _ = &([1,2,3]) as *const _ as *const [i32; 3];
16
17 format!("test");
18 }
19
20 pub type Foo = [i32; 3];
21
22 pub struct Bar {
23 pub x: [i32; 3]
24 }
25
26 pub struct TupleBar([i32; 4]);
27
28 pub enum Baz {
29 BazVariant([i32; 5])
30 }
31
32 pub fn id<T>(x: T) -> T { x }
33
34 pub fn use_id() {
35 let _ = id::<[i32; 3]>([1,2,3]);
36 }
37
38
39 fn main() {}