Skip to content

Commit

Permalink
Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Apr 18, 2024
1 parent 922e8ba commit 1973b90
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/config/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,15 @@ pub enum ControlBraceStyle {
}

#[config_type]
/// How to treat the semicolon that is optional for final diverging expressions
/// (`return`/`break`/`continue`).
pub enum TrailingSemicolon {
/// Always rewrite `return;` and `break;` expressions to have a trailing semicolon,
/// unless the block is a single-line block, e.g. `let PAT = e else { return }`.
Always,
/// Always return `return` and `break` expressions to remove the trailing semicolon.
Never,
/// Preserve an existing trailing semicolon if it exists.
Preserve,
}

Expand Down

0 comments on commit 1973b90

Please sign in to comment.