mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 04:57:19 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			24 lines
		
	
	
		
			331 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			331 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| #![feature(auto_traits)]
 | |
| 
 | |
| pub mod bar {
 | |
|     use std::marker;
 | |
| 
 | |
|     pub auto trait Bar {}
 | |
| 
 | |
|     pub trait Foo {
 | |
|         fn foo(&self) {}
 | |
|     }
 | |
| 
 | |
|     impl Foo {
 | |
|         pub fn test<T: Bar>(&self) {}
 | |
|     }
 | |
| 
 | |
|     pub struct TypeId;
 | |
| 
 | |
|     impl TypeId {
 | |
|         pub fn of<T: Bar + ?Sized>() -> TypeId {
 | |
|             panic!()
 | |
|         }
 | |
|     }
 | |
| }
 | 
