mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			264 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			264 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| struct Foo {
 | |
|     val: (),
 | |
| }
 | |
| 
 | |
| fn foo() -> Foo { //~ ERROR struct literal body without path
 | |
|     val: (),
 | |
| }
 | |
| 
 | |
| fn main() {
 | |
|     let x = foo();
 | |
|     x.val == 42; //~ ERROR mismatched types
 | |
|     let x = { //~ ERROR struct literal body without path
 | |
|         val: (),
 | |
|     };
 | |
| }
 | 
