mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-03 22:49:17 +00:00 
			
		
		
		
	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.
		
			
				
	
	
		
			27 lines
		
	
	
		
			991 B
		
	
	
	
		
			TOML
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			991 B
		
	
	
	
		
			TOML
		
	
	
	
	
	
[package]
 | 
						|
name = "rustc_trait_selection"
 | 
						|
version = "0.0.0"
 | 
						|
edition = "2021"
 | 
						|
 | 
						|
[dependencies]
 | 
						|
# tidy-alphabetical-start
 | 
						|
rustc_ast = { path = "../rustc_ast" }
 | 
						|
rustc_attr = { path = "../rustc_attr" }
 | 
						|
rustc_data_structures = { path = "../rustc_data_structures" }
 | 
						|
rustc_errors = { path = "../rustc_errors" }
 | 
						|
rustc_fluent_macro = { path = "../rustc_fluent_macro" }
 | 
						|
rustc_hir = { path = "../rustc_hir" }
 | 
						|
rustc_index = { path = "../rustc_index" }
 | 
						|
rustc_infer = { path = "../rustc_infer" }
 | 
						|
rustc_macros = { path = "../rustc_macros" }
 | 
						|
rustc_middle = { path = "../rustc_middle" }
 | 
						|
rustc_parse_format = { path = "../rustc_parse_format" }
 | 
						|
rustc_query_system = { path = "../rustc_query_system" }
 | 
						|
rustc_session = { path = "../rustc_session" }
 | 
						|
rustc_span = { path = "../rustc_span" }
 | 
						|
rustc_target = { path = "../rustc_target" }
 | 
						|
rustc_transmute = { path = "../rustc_transmute", features = ["rustc"] }
 | 
						|
smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
 | 
						|
tracing = "0.1"
 | 
						|
# tidy-alphabetical-end
 |