rust/compiler/rustc_middle/src
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
..
dep_graph Reduce exposure of things. 2023-11-16 16:49:22 +11:00
hir Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
hooks Rename hook. 2023-11-01 16:49:18 +00:00
infer Uplift CanonicalVarInfo and friends 2023-11-21 17:49:57 +00:00
middle Replace custom_encodable with encodable. 2023-11-22 18:37:14 +11:00
mir Replace custom_encodable with encodable. 2023-11-22 18:37:14 +11:00
query Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
thir Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
traits Auto merge of #118152 - matthiaskrgr:rollup-bqcck4w, r=matthiaskrgr 2023-11-22 00:30:56 +00:00
ty Replace custom_encodable with encodable. 2023-11-22 18:37:14 +11:00
util Merge ExternProviders into the general Providers struct 2023-09-22 20:15:34 +00:00
arena.rs Remove unused arena kinds in rustc_hir and rustc_middle. 2023-11-20 15:05:26 +11:00
error.rs don't point at const usage site for resolution-time errors 2023-09-14 22:34:05 +02:00
lib.rs Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00
lint.rs Remove support for compiler plugins. 2023-11-04 08:50:46 +11:00
macros.rs Rename CloneLiftImpls as TrivialLiftImpls. 2023-09-18 09:37:09 +10:00
metadata.rs rustc_metadata: Remove Span from ModChild 2023-04-18 17:25:04 +03:00
tests.rs
thir.rs Re-format code with new rustfmt 2023-11-15 21:45:48 -05:00
values.rs make LayoutError::Cycle carry ErrorGuaranteed 2023-11-12 18:59:18 +00:00