forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#81307 - estebank:invalid-byte-str-span, r=p…
…etrochenkov Handle `Span`s for byte and raw strings and add more detail CC rust-lang#81208.
- Loading branch information
Showing
35 changed files
with
278 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#![feature(rustc_attrs)] | ||
|
||
#[rustc_dummy = b"ffi.rs"] //~ ERROR byte constant must be ASCII | ||
#[rustc_dummy = b"ffi.rs"] //~ ERROR non-ASCII character in byte constant | ||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
error: byte constant must be ASCII. Use a \xHH escape for a non-ASCII byte | ||
error: non-ASCII character in byte constant | ||
--> $DIR/key-value-non-ascii.rs:3:19 | ||
| | ||
LL | #[rustc_dummy = b"ffi.rs"] | ||
| ^ | ||
| | | ||
| byte constant must be ASCII | ||
| help: use a \xHH escape for a non-ASCII byte: `\xFB03` | ||
|
||
error: aborting due to previous error | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
fn main() { | ||
let x = "\x80"; //~ ERROR may only be used | ||
let y = "\xff"; //~ ERROR may only be used | ||
let z = "\xe2"; //~ ERROR may only be used | ||
let x = "\x80"; //~ ERROR out of range hex escape | ||
let y = "\xff"; //~ ERROR out of range hex escape | ||
let z = "\xe2"; //~ ERROR out of range hex escape | ||
let a = b"\x00e2"; // ok because byte literal | ||
} |
Oops, something went wrong.