- // FIXME: Check if functions have identity. If not, we should not intern these,
- // but instead create a new id per use.
- // Alternatively we could just make comparing function pointers an error.
+ /// Functions cannot be identified by pointers, as asm-equal functions can get deduplicated
+ /// by the linker and functions can be duplicated across crates.
+ /// We thus generate a new `AllocId` for every mention of a function. This means that
+ /// `main as fn() == main as fn()` is false, while `let x = main as fn(); x == x` is true.