don't compare function pointers -- they're non-deterministic #60

Merged
programmerjake merged 1 commit from programmerjake/fayalite:dont-compare-fn-ptrs into master 2026-01-12 11:19:58 +00:00

from the doc comment:

Note we can't just use function pointers instead -- comparing them is non-deterministic
since Rust will duplicate and/or merge functions, even if those functions happen to have
different UB but just happen to compile to the same assembly language:
https://github.com/rust-lang/unsafe-code-guidelines/issues/589#issuecomment-3515424930

from the doc comment: > Note we can't just use function pointers instead -- comparing them is non-deterministic > since Rust will duplicate and/or merge functions, even if those functions happen to have > different UB but just happen to compile to the same assembly language: > <https://github.com/rust-lang/unsafe-code-guidelines/issues/589#issuecomment-3515424930>
programmerjake added 1 commit 2026-01-12 11:15:49 +00:00
don't compare function pointers -- they're non-deterministic
All checks were successful
/ test (pull_request) Successful in 4m5s
/ test (push) Successful in 4m36s
e366793204
programmerjake scheduled this pull request to auto merge when all checks succeed 2026-01-12 11:16:17 +00:00
programmerjake merged commit e366793204 into master 2026-01-12 11:19:58 +00:00
programmerjake deleted branch dont-compare-fn-ptrs 2026-01-12 11:19:58 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: libre-chip/fayalite#60
No description provided.