about summary refs log tree commit diff
path: root/src/test/run-pass/empty-allocation-rvalue-non-null.rs
diff options
context:
space:
mode:
authorDaniel Micay <danielmicay@gmail.com>2014-04-07 12:36:36 -0400
committerAlex Crichton <alex@alexcrichton.com>2014-04-08 00:03:11 -0700
commitde2567dec9cfceec59db5d6d17df09c05f70d5a1 (patch)
tree633ba9147b3ba98bddae572d4c82359a65ae340f /src/test/run-pass/empty-allocation-rvalue-non-null.rs
parentcced02fcacfe4a6d1598e987003e00aa65713efb (diff)
downloadrust-de2567dec9cfceec59db5d6d17df09c05f70d5a1.tar.gz
rust-de2567dec9cfceec59db5d6d17df09c05f70d5a1.zip
fix ~ZeroSizeType rvalues
Closes #13360
Diffstat (limited to 'src/test/run-pass/empty-allocation-rvalue-non-null.rs')
-rw-r--r--src/test/run-pass/empty-allocation-rvalue-non-null.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/run-pass/empty-allocation-rvalue-non-null.rs b/src/test/run-pass/empty-allocation-rvalue-non-null.rs
new file mode 100644
index 00000000000..a5fc8425cf6
--- /dev/null
+++ b/src/test/run-pass/empty-allocation-rvalue-non-null.rs
@@ -0,0 +1,13 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+pub fn main() {
+    let x = *~();
+}