Commit Graph

5 Commits

Author SHA1 Message Date
Nicholas Nethercote
f1eee2843f Put backticks around some attributes in doc comments.
Without backticks they cause some "unresolved link to `foo`" warnings.
2023-11-27 09:37:01 +11:00
Nicholas Nethercote
0991374bd1 Document newtype_index attributes. 2023-11-22 18:38:20 +11:00
Nicholas Nethercote
7060fc8327 Replace no_ord_impl with orderable.
Similar to the previous commit, this replaces `newtype_index`'s opt-out
`no_ord_impl` attribute with the opt-in `orderable` attribute.
2023-11-22 18:38:17 +11:00
Nicholas Nethercote
3ef9d4d0ed Replace custom_encodable with encodable.
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-11-22 18:37:14 +11:00
Michael Goulet
4506681e2f Begin nightly-ifying rustc_type_ir 2023-11-18 00:20:00 +00:00