summaryrefslogtreecommitdiffstats
path: root/src/test/ui/inference/inference-variable-behind-raw-pointer.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/inference/inference-variable-behind-raw-pointer.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/inference/inference-variable-behind-raw-pointer.rs b/src/test/ui/inference/inference-variable-behind-raw-pointer.rs
new file mode 100644
index 000000000..6662e46b1
--- /dev/null
+++ b/src/test/ui/inference/inference-variable-behind-raw-pointer.rs
@@ -0,0 +1,11 @@
+// check-pass
+
+// tests that the following code compiles, but produces a future-compatibility warning
+
+fn main() {
+ let data = std::ptr::null();
+ let _ = &data as *const *const ();
+ if data.is_null() {}
+ //~^ WARNING type annotations needed
+ //~| WARNING this is accepted in the current edition
+}