mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-30 20:44:34 +00:00 
			
		
		
		
	 18c0369688
			
		
	
	
		18c0369688
		
	
	
	
	
		
			
			Fixes 5167 When ``a.rs`` and ``a/mod.rs`` are both present we would emit an error message telling the user that the module couldn't be found. However, this behavior is misleading because we're dealing with an ambiguous module path, not a "file not found" error. Is the file ``a.rs`` or is it ``a/mod.rs``? Rustfmt can't decide, and the user needs to resolve this ambiguity themselves. Now, the error message displayed to the user is in line with what they would see if they went to compile their code with these conflicting module names.
		
			
				
	
	
		
			4 lines
		
	
	
		
			105 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			4 lines
		
	
	
		
			105 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| // module resolution fails because the path does not exist.
 | |
| #[path = "path/to/does_not_exist.rs"]
 | |
| mod a;
 |