proc-macro2
proc-macro2 copied to clipboard
Inconsistent "indexed-ness" for columns when using within and outside a proc-macro environment
This crates docs for LineColumn say that the column is 0-indexed. The docs for proc_macro::LineColumn say that the column is 1-indexed. As far as I can see, this is a documentation issue in proc_macro2 and the column value from the proc_macro::LineColumn is used without offset.
Looking at the tests, when using the parse::<TokenStream> method outside a proc-macro environment, the column seems to be 0-indexed. PR #372 shows that they are 1-indexed in a proc-macro environment.
Yeah it seems this got changed in libproc_macro in https://github.com/rust-lang/rust/pull/87712.
can I help fixing this?