Skip to content

Documentation update for span line/end/etc? #520

@samitbasu

Description

@samitbasu

The documentation for proc-macro2 still says:

Get the starting line/column in the source file for this span.

This method requires the "span-locations" feature to be enabled.

When executing in a procedural macro context, the returned line/column are only meaningful if compiled with a nightly toolchain. The stable toolchain does not have this information available. When executing outside of a procedural macro, such as main.rs or build.rs, the line/column are always meaningful regardless of toolchain.

With similar disclaimers for end, file etc. Since the MSRV is the "latest stable compiler ABI", I imagine these should be updated, and the reference to the nightly toolchain deleted? I'd be happy to raise a PR if you would like.

Thanks for being such an amazing force in the Rust ecosystem!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions