mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 04:57:19 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			17 lines
		
	
	
		
			355 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			355 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| #![feature(type_alias_impl_trait)]
 | |
| 
 | |
| type Hi = impl Sized;
 | |
| 
 | |
| extern "C" {
 | |
|     #[define_opaque(Hi)] fn foo();
 | |
|     //~^ ERROR only functions, statics, and consts can define opaque types
 | |
| 
 | |
|     #[define_opaque(Hi)] static HI: Hi;
 | |
|     //~^ ERROR only functions, statics, and consts can define opaque types
 | |
| }
 | |
| 
 | |
| #[define_opaque(Hi)]
 | |
| fn main() {
 | |
|     let _: Hi = 0;
 | |
| }
 | 
