]> git.lizzy.rs Git - rust.git/commitdiff
Clean up E0699 explanation
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Mon, 22 Jun 2020 09:50:55 +0000 (11:50 +0200)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Mon, 22 Jun 2020 09:50:55 +0000 (11:50 +0200)
src/librustc_error_codes/error_codes/E0699.md

index f90fd3b562469edd4420eb9a75e86e9f01b866ef..454d2507e5e2e2bf677d95a1c8f278f2e6f7686f 100644 (file)
@@ -1,14 +1,16 @@
 A method was called on a raw pointer whose inner type wasn't completely known.
 
-For example, you may have done something like:
+Erroneous code example:
 
-```compile_fail
+```compile_fail,edition2018,E0699
 # #![deny(warnings)]
+# fn main() {
 let foo = &1;
 let bar = foo as *const _;
 if bar.is_null() {
     // ...
 }
+# }
 ```
 
 Here, the type of `bar` isn't known; it could be a pointer to anything. Instead,