The Rust style guide says non-comment source lines can be up to 100 characters.
It is also 100 in the default configuration for rustfmt
Quoting the sentence about maximum line width:
The maximum width for a line is 100 characters.
Quoting the paragraph about comment lines:
Source lines which are entirely a comment should be limited to 80 characters in length (including comment sigils, but excluding indentation) or the maximum width of the line (including comment sigils and indentation), whichever is smaller:
Testing formatting in the playground it formats the code to fit within 100 characters width:
Unformatted:
fn main() {
let list = [
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25,26, 27, 28, 29, 30,
];
}
Formatted:
fn main() {
let list = [
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
26, 27, 28, 29, 30,
];
}