mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-29 20:15:27 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			20 lines
		
	
	
		
			436 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			436 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| //@ revisions: current next
 | |
| //@ ignore-compare-mode-next-solver (explicit revisions)
 | |
| //@[next] compile-flags: -Znext-solver
 | |
| 
 | |
| #![feature(coroutines, stmt_expr_attributes)]
 | |
| 
 | |
| //@ normalize-stderr-test "std::pin::Unpin" -> "std::marker::Unpin"
 | |
| 
 | |
| use std::marker::Unpin;
 | |
| 
 | |
| fn assert_unpin<T: Unpin>(_: T) {}
 | |
| 
 | |
| fn main() {
 | |
|     let mut coroutine = #[coroutine]
 | |
|     static || {
 | |
|         yield;
 | |
|     };
 | |
|     assert_unpin(coroutine); //~ ERROR E0277
 | |
| }
 | 
