about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2016-07-24 15:18:47 +0530
committerGitHub <noreply@github.com>2016-07-24 15:18:47 +0530
commit87cc1b9330d52833b17bfde93c901521a757041c (patch)
treeb9c1736f282b3fc5050200b6f931e5e7dcb74c22 /src/test
parentcc620d8819dfaceb26e961cc189aa4e36abf3352 (diff)
parente8ac07941c952d352683c7311b343ae72baf9fde (diff)
Rollup merge of #34972 - oli-obk:cant_cast_str_to_const_ptr, r=eddyb
improve const eval error reporting on "" and b"" casts

r? @eddyb

cc @ubsan
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run-pass/const-byte-str-cast.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/test/run-pass/const-byte-str-cast.rs b/src/test/run-pass/const-byte-str-cast.rs
index 2f265b9112b..7297c71a6d6 100644
--- a/src/test/run-pass/const-byte-str-cast.rs
+++ b/src/test/run-pass/const-byte-str-cast.rs
@@ -1,4 +1,4 @@
-// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -12,4 +12,7 @@
 
 pub fn main() {
     let _ = b"x" as &[u8];
+    let _ = b"y" as &[u8; 1];
+    let _ = b"z" as *const u8;
+    let _ = "รค" as *const str;
 }