Clean up E0699 explanation
This commit is contained in:
parent
228a0ed7b0
commit
c474317747
1 changed files with 4 additions and 2 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue