summaryrefslogtreecommitdiffstats
path: root/tests/ui/inference/array-len-mismatch.stderr
blob: 7358e47839725acd7832ae874f45fb8f23d1a2dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
error[E0308]: mismatched types
  --> $DIR/array-len-mismatch.rs:6:26
   |
LL |     let wrong: [u8; 3] = [10, 20];
   |                -------   ^^^^^^^^ expected an array with a fixed size of 3 elements, found one with 2 elements
   |                |    |
   |                |    help: consider specifying the actual array length: `2`
   |                expected due to this

error[E0308]: mismatched types
  --> $DIR/array-len-mismatch.rs:9:26
   |
LL |     let wrong: [u8; 3] = returns_arr();
   |                -------   ^^^^^^^^^^^^^ expected an array with a fixed size of 3 elements, found one with 2 elements
   |                |    |
   |                |    help: consider specifying the actual array length: `2`
   |                expected due to this

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0308`.