|
1 | 1 | error: character literal may only contain one codepoint |
2 | 2 | --> $DIR/lex-bad-char-literals-6.rs:2:19 |
3 | 3 | | |
4 | | -LL | let x: &str = 'ab'; //~ ERROR: character literal may only contain one codepoint |
| 4 | +LL | let x: &str = 'ab'; |
5 | 5 | | ^^^^ |
6 | 6 |
|
7 | 7 | error: character literal may only contain one codepoint |
8 | | - --> $DIR/lex-bad-char-literals-6.rs:3:19 |
| 8 | + --> $DIR/lex-bad-char-literals-6.rs:4:19 |
9 | 9 | | |
10 | | -LL | let y: char = 'cd'; //~ ERROR: character literal may only contain one codepoint |
| 10 | +LL | let y: char = 'cd'; |
11 | 11 | | ^^^^ |
12 | 12 |
|
13 | 13 | error: character literal may only contain one codepoint |
14 | | - --> $DIR/lex-bad-char-literals-6.rs:4:13 |
| 14 | + --> $DIR/lex-bad-char-literals-6.rs:6:13 |
15 | 15 | | |
16 | | -LL | let z = 'ef'; //~ ERROR: character literal may only contain one codepoint |
| 16 | +LL | let z = 'ef'; |
17 | 17 | | ^^^^ |
18 | 18 |
|
19 | | -error[E0308]: mismatched types |
20 | | - --> $DIR/lex-bad-char-literals-6.rs:2:19 |
21 | | - | |
22 | | -LL | let x: &str = 'ab'; //~ ERROR: character literal may only contain one codepoint |
23 | | - | ^^^^ expected &str, found char |
24 | | - | |
25 | | - = note: expected type `&str` |
26 | | - found type `char` |
27 | | - |
28 | 19 | error[E0277]: can't compare `&str` with `char` |
29 | | - --> $DIR/lex-bad-char-literals-6.rs:6:10 |
| 20 | + --> $DIR/lex-bad-char-literals-6.rs:9:10 |
30 | 21 | | |
31 | | -LL | if x == y {} // no error here |
| 22 | +LL | if x == y {} |
32 | 23 | | ^^ no implementation for `&str == char` |
33 | 24 | | |
34 | 25 | = help: the trait `std::cmp::PartialEq<char>` is not implemented for `&str` |
35 | 26 |
|
36 | 27 | error[E0308]: mismatched types |
37 | | - --> $DIR/lex-bad-char-literals-6.rs:10:20 |
| 28 | + --> $DIR/lex-bad-char-literals-6.rs:15:20 |
38 | 29 | | |
39 | | -LL | let a: usize = ""; // type error here to confirm we got past the parser |
| 30 | +LL | let a: usize = ""; |
40 | 31 | | ^^ expected usize, found reference |
41 | 32 | | |
42 | 33 | = note: expected type `usize` |
43 | 34 | found type `&'static str` |
44 | 35 |
|
45 | 36 | error[E0277]: can't compare `&str` with `char` |
46 | | - --> $DIR/lex-bad-char-literals-6.rs:8:10 |
| 37 | + --> $DIR/lex-bad-char-literals-6.rs:12:10 |
47 | 38 | | |
48 | | -LL | if x == z {} // no error here |
| 39 | +LL | if x == z {} |
49 | 40 | | ^^ no implementation for `&str == char` |
50 | 41 | | |
51 | 42 | = help: the trait `std::cmp::PartialEq<char>` is not implemented for `&str` |
52 | 43 |
|
53 | | -error: aborting due to 7 previous errors |
| 44 | +error: aborting due to 6 previous errors |
54 | 45 |
|
55 | 46 | Some errors occurred: E0277, E0308. |
56 | 47 | For more information about an error, try `rustc --explain E0277`. |
0 commit comments