- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Closed
Labels
A-rustdoc-jsonArea: Rustdoc JSON backendArea: Rustdoc JSON backendT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Description
// Signifigant whitespace
pub struct Foo;gives
    "a:2:9232:1965-0:3:1539": {
      "attrs": [],
      "crate_id": 0,
      "deprecation": null,
      "docs": null,
      "id": "a:2:9232:1965-0:3:1539",
      "inner": {
        "blanket_impl": null,
        "for": {
          "inner": {
            "args": {
              "angle_bracketed": {"args": [], "bindings": []}
            },
            "id": "0:3:1539",
            "name": "Foo",
            "param_names": []
          },
          "kind": "resolved_path"
        },
        "generics": {"params": [], "where_predicates": []},
        "is_unsafe": false,
        "items": [],
        "negative": false,
        "provided_trait_methods": [],
        "synthetic": true,
        "trait": {
          "inner": {
            "args": {
              "angle_bracketed": {"args": [], "bindings": []}
            },
            "id": "2:9232:1965",
            "name": "RefUnwindSafe",
            "param_names": []
          },
          "kind": "resolved_path"
        }
      },
      "kind": "impl",
      "links": {},
      "name": null,
      "span": {
        "begin": [1, 0],
        "end": [1, 0],
        "filename": "bad.rs"
      },
      "visibility": "default"
    }with a given span of {"begin": [1, 0], "end": [1, 0], "filename": "bad.rs" }, which is not correct.
I think the span should probably be None/null in this case, which is suported without changing the schema (span: Option<Span> in rustdoc_json_types::Item
@rustbot modify labels: +T-rustdoc +A-rustdoc-json
Metadata
Metadata
Assignees
Labels
A-rustdoc-jsonArea: Rustdoc JSON backendArea: Rustdoc JSON backendT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.