2 Checks for public functions that dereference raw pointer
3 arguments but are not marked `unsafe`.
6 The function should probably be marked `unsafe`, since
7 for an arbitrary raw pointer, there is no way of telling for sure if it is
11 * It does not check functions recursively so if the pointer is passed to a
12 private non-`unsafe` function which does the dereferencing, the lint won't
14 * It only checks for arguments whose type are raw pointers, not raw pointers
15 got from an argument in some other way (`fn foo(bar: &[*const u8])` or
16 `some_argument.get_raw_ptr()`).
20 pub fn foo(x: *const u8) {
21 println!("{}", unsafe { *x });
27 pub unsafe fn foo(x: *const u8) {
28 println!("{}", unsafe { *x });