summaryrefslogtreecommitdiffstats
path: root/src/test/ui/parser/byte-string-literals.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/parser/byte-string-literals.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/parser/byte-string-literals.rs b/src/test/ui/parser/byte-string-literals.rs
new file mode 100644
index 000000000..b1f11024a
--- /dev/null
+++ b/src/test/ui/parser/byte-string-literals.rs
@@ -0,0 +1,9 @@
+static FOO: &'static [u8] = b"\f"; //~ ERROR unknown byte escape
+
+pub fn main() {
+ b"\f"; //~ ERROR unknown byte escape
+ b"\x0Z"; //~ ERROR invalid character in numeric character escape: `Z`
+ b"é"; //~ ERROR non-ASCII character in byte constant
+ br##"é"##; //~ ERROR raw byte string must be ASCII
+ b"a //~ ERROR unterminated double quote byte string
+}