mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-29 20:15:27 +00:00 
			
		
		
		
	 c51f05be30
			
		
	
	
		c51f05be30
		
	
	
	
	
		
			
			This centralizes the placeholder type error reporting in one location, but it also exposes the granularity at which we convert things from hir to ty more. E.g. previously infer types in where bounds were errored together with the function signature, but now they are independent.
		
			
				
	
	
		
			19 lines
		
	
	
		
			522 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			522 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| #![allow(dead_code)]
 | |
| #![allow(unused_variables)]
 | |
| 
 | |
| fn bug() {
 | |
|     macro_rules! m {
 | |
|         () => {
 | |
|             _ //~ ERROR the placeholder `_` is not allowed within types on item signatures for structs
 | |
|             //~^ ERROR the placeholder `_` is not allowed within types on item signatures for structs
 | |
|             //~| ERROR the placeholder `_` is not allowed within types on item signatures for structs
 | |
|         };
 | |
|     }
 | |
|     struct S<T = m!()>(m!(), T)
 | |
|     where
 | |
|         T: Trait<m!()>;
 | |
| }
 | |
| trait Trait<T> {}
 | |
| 
 | |
| fn main() {}
 |