mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 04:57:19 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			273 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			273 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| //! Regression test for https://github.com/rust-lang/rust/issues/11820
 | |
| 
 | |
| //@ run-pass
 | |
| 
 | |
| #![allow(noop_method_call)]
 | |
| 
 | |
| struct NoClone;
 | |
| 
 | |
| fn main() {
 | |
|   let rnc = &NoClone;
 | |
|   let rsnc = &Some(NoClone);
 | |
| 
 | |
|   let _: &NoClone = rnc.clone();
 | |
|   let _: &Option<NoClone> = rsnc.clone();
 | |
| }
 | 
