1 error[E0435]: attempt to use a non-constant value in a constant
2 --> $DIR/repeat_count.rs:5:17
7 error[E0308]: mismatched types
8 --> $DIR/repeat_count.rs:7:17
11 | ^^ expected usize, found ()
13 = note: expected type `usize`
16 error[E0308]: mismatched types
17 --> $DIR/repeat_count.rs:12:17
19 LL | let c = [0; true];
20 | ^^^^ expected usize, found bool
22 error[E0308]: mismatched types
23 --> $DIR/repeat_count.rs:15:17
25 LL | let d = [0; 0.5];
26 | ^^^ expected usize, found floating-point number
28 = note: expected type `usize`
31 error[E0308]: mismatched types
32 --> $DIR/repeat_count.rs:20:17
34 LL | let e = [0; "foo"];
35 | ^^^^^ expected usize, found reference
37 = note: expected type `usize`
38 found type `&'static str`
40 error[E0308]: mismatched types
41 --> $DIR/repeat_count.rs:25:17
43 LL | let f = [0; -4_isize];
44 | ^^^^^^^^ expected usize, found isize
45 help: you can convert an `isize` to `usize` and panic if the converted value wouldn't fit
47 LL | let f = [0; (-4_isize).try_into().unwrap()];
48 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
50 error[E0308]: mismatched types
51 --> $DIR/repeat_count.rs:28:23
53 LL | let f = [0_usize; -1_isize];
54 | ^^^^^^^^ expected usize, found isize
55 help: you can convert an `isize` to `usize` and panic if the converted value wouldn't fit
57 LL | let f = [0_usize; (-1_isize).try_into().unwrap()];
58 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
60 error[E0308]: mismatched types
61 --> $DIR/repeat_count.rs:34:17
63 LL | let g = [0; G { g: () }];
64 | ^^^^^^^^^^^ expected usize, found struct `main::G`
66 = note: expected type `usize`
69 error: aborting due to 8 previous errors
71 Some errors have detailed explanations: E0308, E0435.
72 For more information about an error, try `rustc --explain E0308`.