diff options
| author | Michael Hewson <michael@michaelhewson.ca> | 2017-12-15 08:20:54 +0100 |
|---|---|---|
| committer | Michael Hewson <michael@michaelhewson.ca> | 2017-12-17 10:13:09 +0100 |
| commit | 23555b9f127a787fc649f869a0d39317ea30d681 (patch) | |
| tree | ad98eb608351ff92233cfbe265feaf9c1c2fcad5 | |
| parent | 63ce99c6f8a8dcbe9b739989362aac527202c110 (diff) | |
| download | rust-23555b9f127a787fc649f869a0d39317ea30d681.tar.gz rust-23555b9f127a787fc649f869a0d39317ea30d681.zip | |
fix ui test
had to tell the test suite that it's supposed to compile
| -rw-r--r-- | src/test/ui/inference-variable-behind-raw-pointer.rs | 4 | ||||
| -rw-r--r-- | src/test/ui/inference-variable-behind-raw-pointer.stderr | 4 |
2 files changed, 6 insertions, 2 deletions
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 |
