clippy has a warning for this forget dereferencing it in an unsafe block, this is ALWAYS unsafe unless you have some hashset of valid pointers you check against
-
-
-
Clippy delivers again :) Have we thought about upstreaming some of its warnings into rustc? This one could improve the safety of the Rust ecosystem if it were in rustc and thus used everywhere.
- 1 more reply
New conversation -
-
-
I use that for C API, and I do mark the entire function as unsafe, even though it is never called from rust anyway. OTOH, marking the function as unsafe disables all other safety checks inside the function body, which makes it harder to scope the unsafety into tiny blocks.
-
This is the most annoying thing about unsafe functions IMHO.
- 2 more replies
New conversation -
-
-
Should filtering a vector of raw pointers (that you all control) trigger the warning, calling Iterator::filter on it?
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.