Skip to content

Commit c474317

Browse files
Clean up E0699 explanation
1 parent 228a0ed commit c474317

File tree

1 file changed

+4
-2
lines changed
  • src/librustc_error_codes/error_codes

1 file changed

+4
-2
lines changed

src/librustc_error_codes/error_codes/E0699.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
A method was called on a raw pointer whose inner type wasn't completely known.
22

3-
For example, you may have done something like:
3+
Erroneous code example:
44

5-
```compile_fail
5+
```compile_fail,edition2018,E0699
66
# #![deny(warnings)]
7+
# fn main() {
78
let foo = &1;
89
let bar = foo as *const _;
910
if bar.is_null() {
1011
// ...
1112
}
13+
# }
1214
```
1315

1416
Here, the type of `bar` isn't known; it could be a pointer to anything. Instead,

0 commit comments

Comments
 (0)