]> git.lizzy.rs Git - rust.git/blob - tests/ui/inference/char-as-str-single.fixed
Auto merge of #107021 - matthiaskrgr:rollup-0dzxfyi, r=matthiaskrgr
[rust.git] / tests / ui / inference / char-as-str-single.fixed
1 // When a SINGLE-character string literal is used where a char should be,
2 // suggest changing to single quotes.
3
4 // Testing both single-byte and multi-byte characters, as we should handle both.
5
6 // run-rustfix
7
8 fn main() {
9     let _: char = 'a'; //~ ERROR mismatched types
10     let _: char = '人'; //~ ERROR mismatched types
11     let _: char = '\''; //~ ERROR mismatched types
12 }