mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
16 lines
402 B
Rust
16 lines
402 B
Rust
fn main() {
|
|
let x: &str = 'ab';
|
|
//~^ ERROR: character literal may only contain one codepoint
|
|
let y: char = 'cd';
|
|
//~^ ERROR: character literal may only contain one codepoint
|
|
let z = 'ef';
|
|
//~^ ERROR: character literal may only contain one codepoint
|
|
|
|
if x == y {}
|
|
if y == z {} // no error here
|
|
if x == z {}
|
|
|
|
let a: usize = "";
|
|
//~^ ERROR: mismatched types
|
|
}
|