mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-30 20:44:34 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
		
			259 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			259 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| // Test for https://github.com/rust-lang/rust/issues/48463 issue.
 | |
| 
 | |
| use std::any::Any;
 | |
| use std::ops::Deref;
 | |
| 
 | |
| pub struct AnyValue {
 | |
|     val: Box<Any>,
 | |
| }
 | |
| 
 | |
| impl Deref for AnyValue {
 | |
|     type Target = Any;
 | |
| 
 | |
|     fn deref(&self) -> &Any {
 | |
|         &*self.val
 | |
|     }
 | |
| }
 | 
