mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	 8c50f95cf0
			
		
	
	
		8c50f95cf0
		
	
	
	
	
		
			
			`#[target_feature]` attributes refer to a target-specific list of features. Enabling certain features can imply enabling other features. Certain features are always enabled on certain targets, since they are required by the target's ABI. Features can also be enabled indirectly based on other compiler flags. Feature information is ultimately known to `rustc`. Rather than force external tools to track it -- which may be wildly impractical due to `-C target-cpu` -- have `rustdoc` output `rustc`'s feature data.
		
			
				
	
	
		
			15 lines
		
	
	
		
			788 B
		
	
	
	
		
			XML
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			788 B
		
	
	
	
		
			XML
		
	
	
	
	
	
| //@ only-x86_64-unknown-linux-gnu
 | |
| 
 | |
| //@ is "$.target.triple" \"x86_64-unknown-linux-gnu\"
 | |
| //@ is "$.target.target_features[?(@.name=='sse2')].globally_enabled" true
 | |
| //@ is "$.target.target_features[?(@.name=='avx2')].globally_enabled" false
 | |
| //@ has "$.target.target_features[?(@.name=='avx2')].implies_features" '["avx"]'
 | |
| //@ is "$.target.target_features[?(@.name=='avx2')].unstable_feature_gate" null
 | |
| 
 | |
| // If this breaks due to stabilization, check rustc_target::target_features for a replacement
 | |
| //@ is "$.target.target_features[?(@.name=='amx-tile')].unstable_feature_gate" '"x86_amx_intrinsics"'
 | |
| //@ is "$.target.target_features[?(@.name=='x87')].unstable_feature_gate" '"x87_target_feature"'
 | |
| 
 | |
| // Ensure we don't look like aarch64
 | |
| //@ !has "$.target.target_features[?(@.name=='sve2')]"
 |