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 error[E0308]: mismatched types
14 --> $DIR/repeat_count.rs:10:17
16 LL | let c = [0; true];
17 | ^^^^ expected `usize`, found `bool`
19 error[E0308]: mismatched types
20 --> $DIR/repeat_count.rs:13:17
22 LL | let d = [0; 0.5];
23 | ^^^ expected `usize`, found floating-point number
25 error[E0308]: mismatched types
26 --> $DIR/repeat_count.rs:16:17
28 LL | let e = [0; "foo"];
29 | ^^^^^ expected `usize`, found `&str`
31 error[E0308]: mismatched types
32 --> $DIR/repeat_count.rs:28:17
34 LL | let g = [0; G { g: () }];
35 | ^^^^^^^^^^^ expected `usize`, found struct `main::G`
37 error[E0308]: mismatched types
38 --> $DIR/repeat_count.rs:19:17
40 LL | let f = [0; -4_isize];
41 | ^^^^^^^^ expected `usize`, found `isize`
43 help: you can convert an `isize` to `usize` and panic if the converted value wouldn't fit
45 LL | let f = [0; (-4_isize).try_into().unwrap()];
46 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
48 error[E0308]: mismatched types
49 --> $DIR/repeat_count.rs:22:23
51 LL | let f = [0_usize; -1_isize];
52 | ^^^^^^^^ expected `usize`, found `isize`
54 help: you can convert an `isize` to `usize` and panic if the converted value wouldn't fit
56 LL | let f = [0_usize; (-1_isize).try_into().unwrap()];
57 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
59 error: aborting due to 8 previous errors
61 Some errors have detailed explanations: E0308, E0435.
62 For more information about an error, try `rustc --explain E0308`.