Skip to content

docs: clarify unsafe fn exclusion rationale in is_instrumentable #111

@rocketman-code

Description

@rocketman-code

Context

The is_instrumentable() doc comment in resolve.rs says "unsafe fn" cannot be instrumented, but technically enter() is a safe function and can be called inside an unsafe fn body. The exclusion of unsafe fn is a deliberate design choice (avoid instrumenting unsafe code), not a technical limitation like const fn or extern fn.

Suggested Improvement

Update the doc comment to distinguish the technical limitation (const fn, extern fn) from the design choice (unsafe fn). For example: "const fn (enter() is not const), unsafe fn (avoid instrumenting unsafe code), extern fn (non-Rust ABI)".

Priority

Low -- documentation clarity improvement only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low priorityenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions