mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-05 03:36:21 +00:00

Do not suggest char literal for zero-length strings PR #92507 adds a hint to switch to single quotes when a char is expected and a single-character string literal is provided. The check to ensure the string literal is one character long missed the 0-char case, and would incorrectly offer the hint. This PR adds the missing check, and a test case to confirm the new behavior.