]> git.lizzy.rs Git - rust.git/blob - tests/ui/inference/str-as-char.rs
Rollup merge of #106849 - WaffleLapkin:unvec, r=Nilstrieb
[rust.git] / tests / ui / inference / str-as-char.rs
1 // When a char literal is used where a str should be,
2 // suggest changing to double quotes.
3
4 // run-rustfix
5
6 fn main() {
7     let _: &str = 'a';   //~ ERROR mismatched types
8     let _: &str = '"""'; //~ ERROR character literal may only contain one codepoint
9     let _: &str = '\"\"\"'; //~ ERROR character literal may only contain one codepoint
10 }