2019-01-19 13:37:58 -06:00
|
|
|
fn main() {
|
2019-01-19 23:53:28 -06:00
|
|
|
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
|
2019-01-19 13:37:58 -06:00
|
|
|
|
2019-01-19 23:53:28 -06:00
|
|
|
if x == y {}
|
2019-01-19 13:37:58 -06:00
|
|
|
if y == z {} // no error here
|
2019-01-19 23:53:28 -06:00
|
|
|
if x == z {}
|
2019-01-19 13:37:58 -06:00
|
|
|
|
2019-01-19 23:53:28 -06:00
|
|
|
let a: usize = "";
|
|
|
|
//~^ ERROR: mismatched types
|
|
|
|
}
|