diff options
Diffstat (limited to 'src/docs/zero_ptr.txt')
| -rw-r--r-- | src/docs/zero_ptr.txt | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/docs/zero_ptr.txt b/src/docs/zero_ptr.txt deleted file mode 100644 index e768a023660..00000000000 --- a/src/docs/zero_ptr.txt +++ /dev/null @@ -1,16 +0,0 @@ -### What it does -Catch casts from `0` to some pointer type - -### Why is this bad? -This generally means `null` and is better expressed as -{`std`, `core`}`::ptr::`{`null`, `null_mut`}. - -### Example -``` -let a = 0 as *const u32; -``` - -Use instead: -``` -let a = std::ptr::null::<u32>(); -``` \ No newline at end of file |
