1
Fork 0
rust/compiler/rustc_lint/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
..
nonstandard_style
array_into_iter.rs make the reason: field mandatory for @future_incompatible lints 2023-09-22 08:59:32 +02:00
async_fn_in_trait.rs Don't ICE when encountering unresolved regions in fully_resolve 2023-10-18 20:39:29 +00:00
builtin.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
context.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
deref_into_dyn_supertrait.rs Bump future release warning mode 2023-11-20 19:03:47 +00:00
drop_forget_useless.rs Format all the let chains in compiler 2023-10-13 08:59:36 +00:00
early.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
enum_intrinsics_non_enums.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
errors.rs feat(rustc_lint): make CheckLintName respect lint level 2023-08-30 19:24:44 +01:00
expect.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
for_loops_over_fallibles.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
foreign_modules.rs rename bound region instantiation 2023-11-17 09:29:48 +00:00
hidden_unicode_codepoints.rs migrate: hidden_unicode_codepoints.rs 2023-01-09 17:07:25 -05:00
internal.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
invalid_from_utf8.rs Format all the let chains in compiler 2023-10-13 08:59:36 +00:00
late.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
let_underscore.rs Fix typos in compiler 2023-04-10 22:02:52 +02:00
levels.rs Replace custom_encodable with encodable. 2023-11-22 18:37:14 +11:00
lib.rs Remove --check-cfg checking of --cfg args 2023-11-18 12:21:58 +01:00
lints.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
map_unit_fn.rs Fix #109152, fix the scenario that we may can not get span of func 2023-03-15 14:07:39 +08:00
methods.rs refactor(rustc_middle): Substs -> GenericArg 2023-07-14 13:27:35 +01:00
multiple_supertrait_upcastable.rs Format all the let chains in compiler 2023-10-13 08:59:36 +00:00
non_ascii_idents.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
non_fmt_panic.rs Use Option::is_some_and and Result::is_ok_and in the compiler 2023-05-24 14:20:41 +00:00
nonstandard_style.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
noop_method_call.rs Fix noop_method_call detection for new diagnostic items 2023-09-28 08:22:59 -04:00
opaque_hidden_inferred_bound.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
pass_by_value.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
passes.rs Remove rustc_lint_defs::lint_array 2023-09-28 23:01:25 +02:00
ptr_nulls.rs Format all the let chains in compiler 2023-10-13 08:59:36 +00:00
redundant_semicolon.rs refactor: cleanup 2023-01-09 18:57:02 -05:00
reference_casting.rs Fix some typos 2023-11-14 23:06:50 +08:00
tests.rs refactor(rustc_lint): inline check_lint_name_cmdline 2023-08-30 17:35:07 +01:00
traits.rs make comments less cryptic 2023-09-06 12:09:29 +03:00
types.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00
unused.rs Fix clippy::needless_borrow in the compiler 2023-11-21 20:13:40 +01:00