about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/example/std_example.rs
diff options
context:
space:
mode:
authorChris Denton <chris@chrisdenton.dev>2025-04-19 14:01:38 +0000
committerGitHub <noreply@github.com>2025-04-19 14:01:38 +0000
commitd49361a79871602b40182790d7dd064ece1d3c5d (patch)
tree780ecab05ef7106a06b3eb61a62a86c88fbddd16 /compiler/rustc_codegen_cranelift/example/std_example.rs
parentdff14f06341309b7edf3e760ab9762175db322f3 (diff)
parent076016d55afdf760c7e30e23c5df8f0c079cd85b (diff)
downloadrust-d49361a79871602b40182790d7dd064ece1d3c5d.tar.gz
rust-d49361a79871602b40182790d7dd064ece1d3c5d.zip
Rollup merge of #139919 - GuillaumeGomez:rustdoc-json-1-indexed, r=aDotInTheVoid
Make rustdoc JSON Span column 1-based, just like line numbers

Fixes https://github.com/rust-lang/rust/issues/139906.

This PR does two things:
 1. It makes column 1-indexed as well, just like lines.
 2. It updates documentation about them to mention that they are 1-indexed.

I think it's better for coherency to have them both 1-indexed instead of the weird mix we used to have. Docs for `line` and `col` fields can be found [here](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_span/struct.Loc.html#structfield.line).

And finally: it adds a regression test to ensure they are indeed 1-indexed.

r? `@aDotInTheVoid`
Diffstat (limited to 'compiler/rustc_codegen_cranelift/example/std_example.rs')
0 files changed, 0 insertions, 0 deletions