mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-03 22:49:17 +00:00 
			
		
		
		
	Fixes #109543. When checking paths in HIR typeck, we don't want to check for const predicates since all we want might just be a function pointer. Therefore we move this to MIR constck and check that bounds are met during MIR constck.
		
			
				
	
	
		
			8 lines
		
	
	
		
			139 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			8 lines
		
	
	
		
			139 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
struct X<const N: usize = {
 | 
						|
    (||1usize)()
 | 
						|
    //~^ ERROR cannot call non-const closure
 | 
						|
    //~| ERROR the trait bound
 | 
						|
}>;
 | 
						|
 | 
						|
fn main() {}
 |