Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#71284 - JOE1994:serialize_id, r=petrochenkov
fix -Zast-json to output correct JSON form fixes rust-lang#71086 (Reverts some of the changes made in rust-lang#70215) JSON output (from an empty library) after fix has something for **"id"** field ```shell lonelyjoe@lonelyjoe-desktop:~/workspace/empty_lib/src$ rustc lib.rs -Zast-json ``` ```json { "module":{ "inner":{ "lo":0, "hi":94 }, "items":[ { "attrs":[ { "kind":{ "variant":"Normal", "fields":[ { "path":{ "span":{ "lo":0, "hi":0 }, "segments":[ { "ident":{ "name":"prelude_import", "span":{ "lo":0, "hi":0 } }, "id":3, "args":null } ] }, "args":"Empty" } ] }, "id":null, "style":"Outer", "span":{ "lo":0, "hi":0 } } ], "id":4, "span":{ "lo":0, "hi":0 }, "vis":{ "node":"Inherited", "span":{ "lo":0, "hi":0 } }, "ident":{ "name":"", "span":{ "lo":0, "hi":0 } }, "kind":{ "variant":"Use", "fields":[ { "prefix":{ "span":{ "lo":0, "hi":0 }, "segments":[ { "ident":{ "name":"{{root}}", "span":{ "lo":0, "hi":0 } }, "id":5, "args":null }, { "ident":{ "name":"std", "span":{ "lo":0, "hi":0 } }, "id":6, "args":null }, { "ident":{ "name":"prelude", "span":{ "lo":0, "hi":0 } }, "id":7, "args":null }, { "ident":{ "name":"v1", "span":{ "lo":0, "hi":0 } }, "id":8, "args":null } ] }, "kind":"Glob", "span":{ "lo":0, "hi":0 } } ] }, "tokens":null }, { "attrs":[ { "kind":{ "variant":"Normal", "fields":[ { "path":{ "span":{ "lo":0, "hi":0 }, "segments":[ { "ident":{ "name":"macro_use", "span":{ "lo":0, "hi":0 } }, "id":9, "args":null } ] }, "args":"Empty" } ] }, "id":null, "style":"Outer", "span":{ "lo":0, "hi":0 } } ], "id":10, "span":{ "lo":0, "hi":0 }, "vis":{ "node":"Inherited", "span":{ "lo":0, "hi":0 } }, "ident":{ "name":"std", "span":{ "lo":0, "hi":0 } }, "kind":{ "variant":"ExternCrate", "fields":[ null ] }, "tokens":null } ], "inline":true }, "attrs":[ ], "span":{ "lo":0, "hi":94 }, "proc_macros":[ ] } ```
- Loading branch information