about summary refs log tree commit diff
path: root/compiler/rustc_ast/src/node_id.rs
AgeCommit message (Collapse)AuthorLines
2023-11-22Replace `no_ord_impl` with `orderable`.Nicholas Nethercote-0/+1
Similar to the previous commit, this replaces `newtype_index`'s opt-out `no_ord_impl` attribute with the opt-in `orderable` attribute.
2023-11-22Replace `custom_encodable` with `encodable`.Nicholas Nethercote-0/+1
By default, `newtype_index!` types get a default `Encodable`/`Decodable` impl. You can opt out of this with `custom_encodable`. Opting out is the opposite to how Rust normally works with autogenerated (derived) impls. This commit inverts the behaviour, replacing `custom_encodable` with `encodable` which opts into the default `Encodable`/`Decodable` impl. Only 23 of the 59 `newtype_index!` occurrences need `encodable`. Even better, there were eight crates with a dependency on `rustc_serialize` just from unused default `Encodable`/`Decodable` impls. This commit removes that dependency from those eight crates.
2023-04-16Various minor Idx-related tweaksScott McMurray-4/+4
Nothing particularly exciting here, but a couple of things I noticed as I was looking for more index conversions to simplify.
2022-12-18A few small cleanups for `newtype_index`Nilstrieb-2/+1
Remove the `..` from the body, only a few invocations used it and it's inconsistent with rust syntax. Use `;` instead of `,` between consts. As the Rust syntax gods inteded.
2022-12-18Make `#[debug_format]` an attribute in `newtype_index`Nilstrieb-1/+1
This removes the `custom` format functionality as its only user was trivially migrated to using a normal format. If a new use case for a custom formatting impl pops up, you can add it back.
2022-09-10rustc_error, rustc_private, rustc_ast: Switch to stable hash containersNiklas Jonsson-1/+1
2021-07-17Use LocalExpnId where possible.Camille GILLOT-5/+5
2021-07-17Make the CrateNum part of the ExpnId.Camille GILLOT-3/+3
2021-02-07Clarify docs for `DUMMY_NODE_ID`Camelid-3/+3
2021-01-11Document `NodeId`Camelid-3/+9
2020-11-06The renumber pass is long goneest31-2/+2
Originally, there has been a dedicated pass for renumbering AST NodeIds to have actual values. This pass had been added by commit a5ad4c379466519a0bf977864a5cdc50a7ade385. Then, later, this step was moved to where it resides now, macro expansion. See commit c86c8d41a26b2037e80c9fd028a59313a78b3a66 or PR #36438. The comment snippet, added by the original commit, has survived the times without any change, becoming outdated at removal of the dedicated pass. Nowadays, grepping for the next_node_id function will show up multiple places in the compiler that call it, but the main rewriting that the comment talks about is still done in the expansion step, inside an innocious looking visit_id function that's called during macro invocation collection.
2020-08-30mv compiler to compiler/mark-0/+34