mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-04 06:56:14 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
		
			210 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			210 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
//@ check-pass
 | 
						|
//@ edition:2018
 | 
						|
 | 
						|
mod my {
 | 
						|
    pub mod sub {
 | 
						|
        pub fn bar() {}
 | 
						|
    }
 | 
						|
}
 | 
						|
 | 
						|
mod sub {
 | 
						|
    pub fn bar() {}
 | 
						|
}
 | 
						|
 | 
						|
fn foo() {
 | 
						|
    use my::sub;
 | 
						|
    {
 | 
						|
        use sub::bar; // OK
 | 
						|
    }
 | 
						|
}
 | 
						|
 | 
						|
fn main() {}
 |