]> git.lizzy.rs Git - rust.git/blob - src/test/ui/repeat_count.stderr
Rollup merge of #57132 - daxpedda:master, r=steveklabnik
[rust.git] / src / test / ui / repeat_count.stderr
1 error[E0435]: attempt to use a non-constant value in a constant
2   --> $DIR/repeat_count.rs:5:17
3    |
4 LL |     let a = [0; n];
5    |                 ^ non-constant value
6
7 error[E0308]: mismatched types
8   --> $DIR/repeat_count.rs:7:17
9    |
10 LL |     let b = [0; ()];
11    |                 ^^ expected usize, found ()
12    |
13    = note: expected type `usize`
14               found type `()`
15
16 error[E0308]: mismatched types
17   --> $DIR/repeat_count.rs:12:17
18    |
19 LL |     let c = [0; true];
20    |                 ^^^^ expected usize, found bool
21
22 error[E0308]: mismatched types
23   --> $DIR/repeat_count.rs:15:17
24    |
25 LL |     let d = [0; 0.5];
26    |                 ^^^ expected usize, found floating-point number
27    |
28    = note: expected type `usize`
29               found type `{float}`
30
31 error[E0308]: mismatched types
32   --> $DIR/repeat_count.rs:20:17
33    |
34 LL |     let e = [0; "foo"];
35    |                 ^^^^^ expected usize, found reference
36    |
37    = note: expected type `usize`
38               found type `&'static str`
39
40 error[E0308]: mismatched types
41   --> $DIR/repeat_count.rs:25:17
42    |
43 LL |     let f = [0; -4_isize];
44    |                 ^^^^^^^^ expected usize, found isize
45
46 error[E0308]: mismatched types
47   --> $DIR/repeat_count.rs:28:23
48    |
49 LL |     let f = [0_usize; -1_isize];
50    |                       ^^^^^^^^ expected usize, found isize
51
52 error[E0308]: mismatched types
53   --> $DIR/repeat_count.rs:34:17
54    |
55 LL |     let g = [0; G { g: () }];
56    |                 ^^^^^^^^^^^ expected usize, found struct `main::G`
57    |
58    = note: expected type `usize`
59               found type `main::G`
60
61 error: aborting due to 8 previous errors
62
63 Some errors occurred: E0308, E0435.
64 For more information about an error, try `rustc --explain E0308`.