proc-macro2 icon indicating copy to clipboard operation
proc-macro2 copied to clipboard

Documentation update for span line/end/etc?

Open samitbasu opened this issue 5 months ago • 0 comments

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!

samitbasu avatar Sep 15 '25 01:09 samitbasu