Tell unicode escapes can’t be used as bytes earlier/more
This commit is contained in:
parent
d22f189da1
commit
4d65ef4549
2 changed files with 19 additions and 19 deletions
|
|
@ -16,7 +16,8 @@ fn main() {
|
|||
//~^ ERROR unicode escape sequences cannot be used as a byte or in a byte string
|
||||
|
||||
let _ = b'\u';
|
||||
//~^ ERROR unknown byte escape: u
|
||||
//~^ ERROR incorrect unicode escape sequence
|
||||
//~^^ ERROR unicode escape sequences cannot be used as a byte or in a byte string
|
||||
|
||||
let _ = b'\x5';
|
||||
//~^ ERROR numeric character escape is too short
|
||||
|
|
@ -35,11 +36,12 @@ fn main() {
|
|||
let _ = b"\u{a4a4} \xf \u";
|
||||
//~^ ERROR unicode escape sequences cannot be used as a byte or in a byte string
|
||||
//~^^ ERROR illegal character in numeric character escape:
|
||||
//~^^^ ERROR unknown byte escape: u
|
||||
//~^^^ ERROR incorrect unicode escape sequence
|
||||
//~^^^^ ERROR unicode escape sequences cannot be used as a byte or in a byte string
|
||||
|
||||
let _ = "\u{ffffff} \xf \u";
|
||||
//~^ ERROR illegal unicode character escape
|
||||
//~^^ ERROR illegal character in numeric character escape:
|
||||
//~^^^ ERROR form of character escape may only be used with characters in the range [\x00-\x7f]
|
||||
//~^^^^ ERROR incomplete unicode escape sequence
|
||||
//~^^^^ ERROR incorrect unicode escape sequence
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue