diff --git a/src/test/ui/inference-variable-behind-raw-pointer.rs b/src/test/ui/inference-variable-behind-raw-pointer.rs index f2065ae6a1a..0ae027679fe 100644 --- a/src/test/ui/inference-variable-behind-raw-pointer.rs +++ b/src/test/ui/inference-variable-behind-raw-pointer.rs @@ -8,6 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +// must-compile-successfully + +// tests that the following code compiles, but produces a future-compatibility warning + fn main() { let data = std::ptr::null(); let _ = &data as *const *const (); diff --git a/src/test/ui/inference-variable-behind-raw-pointer.stderr b/src/test/ui/inference-variable-behind-raw-pointer.stderr index b0aa21cf5f5..a8874c9bf5a 100644 --- a/src/test/ui/inference-variable-behind-raw-pointer.stderr +++ b/src/test/ui/inference-variable-behind-raw-pointer.stderr @@ -1,7 +1,7 @@ warning[E0619]: the type of this value must be known in this context - --> $DIR/inference-variable-behind-raw-pointer.rs:14:13 + --> $DIR/inference-variable-behind-raw-pointer.rs:18:13 | -14 | if data.is_null() {} +18 | if data.is_null() {} | ^^^^^^^ | = note: this will be made into a hard error in a future version of the compiler