mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-03 09:32:42 +00:00
Note irrefutable while let in loop type errors When a while-let loop is used where a non-unit value is expected, rustc already notes that while loops evaluate to unit. For simple irrefutable while-let patterns, add an extra note explaining that the pattern always matches and the loop condition never fails. Covers binding, wildcard, and tuples made from those patterns. Fixes rust-lang/rust#116572. Tested with: ```./x test tests/ui/coercion/coerce-loop-issue-122561.rs --bless```