File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -722,9 +722,12 @@ declare_clippy_lint! {
722
722
/// **What it does:** Checks for casts of function pointers to something other than usize
723
723
///
724
724
/// **Why is this bad?**
725
- /// Depending on the system architechture, casting a function pointer to something other than
726
- /// `usize` will result in incorrect pointer addresses.
727
- /// `usize` will always be able to store the function pointer on the given architechture.
725
+ /// Casting a function pointer to anything other than usize/isize is not portable across
726
+ /// architectures, because you end up losing bits if the target type is too small or end up with a
727
+ /// bunch of extra bits that waste space and add more instructions to the final binary than
728
+ /// strictly necessary for the problem
729
+ ///
730
+ /// Casting to isize also doesn't make sense since there are no signed addresses.
728
731
///
729
732
/// **Example**
730
733
///
You can’t perform that action at this time.
0 commit comments