rust/compiler/rustc_infer
Matthias Krüger 8429dcdb79
Rollup merge of #92715 - chordtoll:empty-string, r=davidtwco
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.
2022-02-08 16:40:47 +01:00
..
src Rollup merge of #92715 - chordtoll:empty-string, r=davidtwco 2022-02-08 16:40:47 +01:00
Cargo.toml Migrate to 2021 2021-09-20 22:21:42 -04:00