RS.CLIPPY.POSSIBLE_MISSING_COMMA

Possible missing comma in array

This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: possible_missing_comma. Copyright ©2025 The Rust Team. All rights reserved.

What it does

Checks for possible missing comma in an array. It lints if an array element is a binary operator expression and it lies on two lines.

Why is this bad?

This could lead to unexpected results.

Example

let a = &[
    -1, -2, -3 // <= no comma here
    -4, -5, -6
];