]> git.proxmox.com Git - rustc.git/blob - src/test/ui/inference/char-as-str-single.rs
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / inference / char-as-str-single.rs
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 }