about summary refs log tree commit diff
path: root/tests/ui/stable-addr-of.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/stable-addr-of.rs')
-rw-r--r--tests/ui/stable-addr-of.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/stable-addr-of.rs b/tests/ui/stable-addr-of.rs
new file mode 100644
index 00000000000..99839166e30
--- /dev/null
+++ b/tests/ui/stable-addr-of.rs
@@ -0,0 +1,8 @@
+// run-pass
+// Issue #2040
+
+
+pub fn main() {
+    let foo: isize = 1;
+    assert_eq!(&foo as *const isize, &foo as *const isize);
+}