mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
		
			209 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			209 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| #![feature(const_trait_impl)]
 | |
| 
 | |
| pub trait A {
 | |
|     fn assoc() -> bool;
 | |
| }
 | |
| 
 | |
| pub const fn foo<T: A>() -> bool {
 | |
|     T::assoc()
 | |
|     //~^ ERROR the trait bound
 | |
|     //~| ERROR cannot call non-const fn
 | |
| }
 | |
| 
 | |
| fn main() {}
 | 
