mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-05 01:24:03 +00:00
Removing the semicolon of the last statement of an expressionless block may change the block type even if the statement's type is `()`. If the block type is `!` because of a systematic early return, typing it as `()` may make it incompatible with the expected type for the block (to which `!` is cast). Fix #14100 changelog: [`unnecessary_semicolon`]: do not remove semicolon if it could change the block type from `!` to `()`