mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-04 06:56:14 +00:00 
			
		
		
		
	Add infrastructure to apply a derive macro to arguments, consuming and returning a `TokenTree` only. Handle `SyntaxExtensionKind::MacroRules` when expanding a derive, if the macro's kinds support derive. Add tests covering various cases of `macro_rules` derives. Note that due to a pre-existing FIXME in `expand.rs`, derives are re-queued and some errors get emitted twice. Duplicate diagnostic suppression makes them not visible, but the FIXME should still get fixed.
		
			
				
	
	
		
			18 lines
		
	
	
		
			596 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			596 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
MyExportedDerive: body="struct _S1;"
 | 
						|
MyExportedDerive: body="struct _Twice1;"
 | 
						|
MyExportedDerive: body="struct _Twice1;"
 | 
						|
MyExportedDerive!("")
 | 
						|
MyExportedDerive!("invoked, arguments")
 | 
						|
MyExportedDerive: body="struct _S2;"
 | 
						|
MyExportedDerive: body="struct _Twice2;"
 | 
						|
MyExportedDerive: body="struct _Twice2;"
 | 
						|
MyExportedDerive!("")
 | 
						|
MyExportedDerive!("invoked, arguments")
 | 
						|
MyLocalDerive: body="struct _S3;"
 | 
						|
MyLocalDerive: body="struct _Twice3;"
 | 
						|
MyLocalDerive: body="struct _Twice3;"
 | 
						|
MyLocalDerive!("")
 | 
						|
MyLocalDerive!("invoked, arguments")
 | 
						|
MyGlobalType::name(): MyGlobalType
 | 
						|
MyLocalType::name(): MyLocalType
 |