mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-14 23:22:30 +00:00
12 lines
449 B
Plaintext
12 lines
449 B
Plaintext
// When a char literal is used where a str should be,
|
|
// suggest changing to double quotes.
|
|
|
|
//@ run-rustfix
|
|
|
|
fn main() {
|
|
let _: &str = "a"; //~ ERROR mismatched types
|
|
let _: &str = "\"\"\""; //~ ERROR character literal may only contain one codepoint
|
|
let _: &str = "\"\"\""; //~ ERROR character literal may only contain one codepoint
|
|
let _: &str = "\"\"\\\"\\\"\\\\\""; //~ ERROR character literal may only contain one codepoint
|
|
}
|