mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			12 lines
		
	
	
		
			207 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			207 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| use std::marker;
 | |
| 
 | |
| struct Foo { foo: Bar<Foo> }
 | |
| 
 | |
| struct Bar<T> { x: Bar<Foo> , marker: marker::PhantomData<T> }
 | |
| //~^ ERROR recursive type `Bar` has infinite size
 | |
| 
 | |
| impl Foo { fn foo(&self) {} }
 | |
| 
 | |
| fn main() {
 | |
| }
 | 
