mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-03 22:49:17 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			14 lines
		
	
	
		
			241 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			241 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
// Test to ensure private traits are inaccessible with UFCS angle-bracket syntax.
 | 
						|
 | 
						|
mod foo {
 | 
						|
    trait Bar {
 | 
						|
        fn baz() {}
 | 
						|
    }
 | 
						|
 | 
						|
    impl Bar for i32 {}
 | 
						|
}
 | 
						|
 | 
						|
fn main() {
 | 
						|
    <i32 as ::foo::Bar>::baz(); //~ERROR trait `Bar` is private
 | 
						|
}
 |