Skip to content

Commit e979392

Browse files
authored
Rollup merge of rust-lang#73610 - GuillaumeGomez:cleanup-e0699, r=Dylan-DPC
Clean up E0699 explanation r? @Dylan-DPC
2 parents b3d99cb + c474317 commit e979392

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)