You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This proposed lint would detect and warn about unnecessary trailing commas in macro parameters. While a trailing comma in macro parameters is not an error in Rust, it can be superfluous and might not align with some coding style preferences.
Advantage
Improved Readability: Removing unnecessary trailing commas can make the code clearer and easier to read.
Consistency: Enforcing this style can help maintain a consistent coding standard across the codebase.
Drawbacks
No response
Example
println!("Hello, world!",);
Could be written as:
println!("Hello, world!");
The text was updated successfully, but these errors were encountered:
Not every macro behaves the same way with respect to trailing commas FWIW. Macros bundled with rustc tend to accept them, but treats them as optional. Macros created by user might require it to function.
What it does
This proposed lint would detect and warn about unnecessary trailing commas in macro parameters. While a trailing comma in macro parameters is not an error in Rust, it can be superfluous and might not align with some coding style preferences.
Advantage
Drawbacks
No response
Example
Could be written as:
The text was updated successfully, but these errors were encountered: