Skip to content

Line indexes in Span are incorrectly claimed to be "zero indexed" #139906

Closed
@fluiderson

Description

@fluiderson

Location

Summary

echo "pub mod bbb {}" > aaa.rs;
RUSTC_BOOTSTRAP=1 rustdoc aaa.rs -Zunstable-options -wjson -o- |
jq '.index | map(select(.name == "bbb"))[0].span';
rm aaa.rs

outputs

{
  "filename": "aaa.rs",
  "begin": [
    1, // Not zero indexed.
    0
  ],
  "end": [
    1, // Not zero indexed.
    11
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsA-rustdoc-jsonArea: Rustdoc JSON backendT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions