mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-03 22:49:17 +00:00 
			
		
		
		
	Accurately refer to assoc fn without receiver as assoc fn instead of methods. Add `AssocItem::descr` method to centralize where we call methods and associated functions.
		
			
				
	
	
		
			13 lines
		
	
	
		
			233 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			233 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
//@ edition: 2021
 | 
						|
 | 
						|
trait Foo {
 | 
						|
    async fn foo<T>();
 | 
						|
}
 | 
						|
 | 
						|
impl Foo for () {
 | 
						|
    async fn foo<const N: usize>() {}
 | 
						|
    //~^ ERROR: associated function `foo` has an incompatible generic parameter for trait `Foo` [E0053]
 | 
						|
}
 | 
						|
 | 
						|
fn main() {}
 |