if (ltype_length != rtype_length)
{
- rust_error_at (
- rvalue_locus,
- "expected an array with a fixed size of " HOST_WIDE_INT_PRINT_UNSIGNED
- " elements, found one with " HOST_WIDE_INT_PRINT_UNSIGNED " elements",
- ltype_length, rtype_length);
+ rust_error_at (rvalue_locus, ErrorCode::E0308,
+ "mismatched types, expected an array with a fixed size "
+ "of " HOST_WIDE_INT_PRINT_UNSIGNED
+ " elements, found one with " HOST_WIDE_INT_PRINT_UNSIGNED
+ " elements",
+ ltype_length, rtype_length);
return false;
}
// { dg-additional-options "-w" }
fn main() {
let array: [i32; 5] = [1, 2, 3];
- // { dg-error "expected an array with a fixed size of 5 elements, found one with 3 elements" "" { target *-*-* } .-1 }
+ // { dg-error "mismatched types, expected an array with a fixed size of 5 elements, found one with 3 elements" "" { target *-*-* } .-1 }
}