mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-04 06:56:14 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
		
			316 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			316 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
error: expected `{`, found `22`
 | 
						|
  --> $DIR/closure-return-syntax.rs:5:23
 | 
						|
   |
 | 
						|
LL |     let x = || -> i32 22;
 | 
						|
   |                       ^^ expected `{`
 | 
						|
   |
 | 
						|
help: try placing this code inside a block
 | 
						|
   |
 | 
						|
LL |     let x = || -> i32 { 22 };
 | 
						|
   |                       +    +
 | 
						|
 | 
						|
error: aborting due to 1 previous error
 | 
						|
 |