mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-30 20:44:34 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			28 lines
		
	
	
		
			940 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			940 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| //@ revisions: real pre_expansion
 | |
| //@[pre_expansion] check-pass
 | |
| //@ edition: 2021
 | |
| 
 | |
| #![feature(precise_capturing)]
 | |
| 
 | |
| #[cfg(real)]
 | |
| trait Foo: use<> {
 | |
|     //[real]~^ ERROR `use<...>` precise capturing syntax not allowed
 | |
|     type Assoc: use<> where (): use<>;
 | |
|     //[real]~^ ERROR `use<...>` precise capturing syntax not allowed
 | |
|     //[real]~| ERROR `use<...>` precise capturing syntax not allowed
 | |
| }
 | |
| 
 | |
| #[cfg(real)]
 | |
| fn fun<T: use<>>(_: impl use<>) where (): use<> {}
 | |
| //[real]~^ ERROR `use<...>` precise capturing syntax not allowed
 | |
| //[real]~| ERROR `use<...>` precise capturing syntax not allowed
 | |
| //[real]~| ERROR `use<...>` precise capturing syntax not allowed
 | |
| //[real]~| ERROR at least one trait must be specified
 | |
| 
 | |
| #[cfg(real)]
 | |
| fn dynamic() -> Box<dyn use<>> {}
 | |
| //[real]~^ ERROR `use<...>` precise capturing syntax not allowed in `dyn` trait object bounds
 | |
| //[real]~| ERROR at least one trait is required for an object type [E0224]
 | |
| 
 | |
| fn main() {}
 | 
