 694c06f3d0
			
		
	
	
		694c06f3d0
		
			
		
	
	
	
	
		
			
			# Objective Currently the `missing_docs` lint is allowed-by-default and enabled at crate level when their documentations is complete (see #3492). This PR proposes to inverse this logic by making `missing_docs` warn-by-default and mark crates with imcomplete docs allowed. ## Solution Makes `missing_docs` warn at workspace level and allowed at crate level when the docs is imcomplete.
		
			
				
	
	
		
			33 lines
		
	
	
		
			924 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			924 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| // FIXME(3492): remove once docs are ready
 | |
| #![allow(missing_docs)]
 | |
| 
 | |
| use bevy_macro_utils::BevyManifest;
 | |
| use encase_derive_impl::{implement, syn};
 | |
| 
 | |
| const ENCASE: &str = "encase";
 | |
| 
 | |
| fn bevy_encase_path() -> syn::Path {
 | |
|     let bevy_manifest = BevyManifest::default();
 | |
|     bevy_manifest
 | |
|         .get_subcrate("render")
 | |
|         .map(|bevy_render_path| {
 | |
|             let mut segments = bevy_render_path.segments;
 | |
|             segments.push(BevyManifest::parse_str("render_resource"));
 | |
|             syn::Path {
 | |
|                 leading_colon: None,
 | |
|                 segments,
 | |
|             }
 | |
|         })
 | |
|         .map(|path| {
 | |
|             let mut segments = path.segments;
 | |
|             segments.push(BevyManifest::parse_str(ENCASE));
 | |
|             syn::Path {
 | |
|                 leading_colon: None,
 | |
|                 segments,
 | |
|             }
 | |
|         })
 | |
|         .unwrap_or_else(|| bevy_manifest.get_path(ENCASE))
 | |
| }
 | |
| 
 | |
| implement!(bevy_encase_path());
 |