]> git.lizzy.rs Git - rust.git/commitdiff
fix ui test
authorMichael Hewson <michael@michaelhewson.ca>
Fri, 15 Dec 2017 07:20:54 +0000 (08:20 +0100)
committerMichael Hewson <michael@michaelhewson.ca>
Sun, 17 Dec 2017 09:13:09 +0000 (10:13 +0100)
had to tell the test suite that it's supposed to compile

src/test/ui/inference-variable-behind-raw-pointer.rs
src/test/ui/inference-variable-behind-raw-pointer.stderr

index f2065ae6a1ace0213a68042a5e1b6a153c71ee97..0ae027679fe310d61d76fcfb5b90bc132e35a9e9 100644 (file)
@@ -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 ();
index b0aa21cf5f5f0577ceb574b3e1cd5d3fb81e881c..a8874c9bf5a39e89a1f82a023c1b518e52616db3 100644 (file)
@@ -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