mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-03 22:49:17 +00:00 
			
		
		
		
	...and remove the `const_arg_path` feature gate as a result. It was only a stopgap measure to fix the regression that the new lowering introduced (which should now be fixed by this PR).
		
			
				
	
	
		
			17 lines
		
	
	
		
			316 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			316 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
//@ incremental
 | 
						|
#![crate_type = "lib"]
 | 
						|
 | 
						|
trait Q {
 | 
						|
    const ASSOC: usize;
 | 
						|
}
 | 
						|
 | 
						|
impl<const N: u64> Q for [u8; N] {
 | 
						|
    //~^ ERROR: the constant `N` is not of type `usize`
 | 
						|
    const ASSOC: usize = 1;
 | 
						|
}
 | 
						|
 | 
						|
pub fn test() -> [u8; <[u8; 13] as Q>::ASSOC] {
 | 
						|
    //~^ ERROR: the constant `13` is not of type `u64`
 | 
						|
    todo!()
 | 
						|
}
 |