mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			298 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			298 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| // check-pass
 | |
| 
 | |
| // Make sure that we only consider *Self* supertrait predicates
 | |
| // in the `unused_must_use` lint.
 | |
| 
 | |
| #![feature(trait_alias)]
 | |
| #![deny(unused_must_use)]
 | |
| 
 | |
| trait Foo<T> = Sized where T: Iterator;
 | |
| 
 | |
| fn test<T: Iterator>() -> impl Foo<T> {}
 | |
| 
 | |
| fn main() {
 | |
|     test::<std::iter::Once<()>>();
 | |
| }
 | 
