mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 04:57:19 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			26 lines
		
	
	
		
			493 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			493 B
		
	
	
	
		
			Rust
		
	
	
	
	
	
| mod m2 {
 | |
|     pub enum Foo {
 | |
|         A,
 | |
|         B(isize),
 | |
|         C { a: isize },
 | |
|     }
 | |
| 
 | |
|     impl Foo {
 | |
|         pub fn foo() {}
 | |
|         pub fn bar(&self) {}
 | |
|     }
 | |
| }
 | |
| 
 | |
| mod m {
 | |
|     pub use m2::Foo::*;
 | |
| }
 | |
| 
 | |
| pub fn main() {
 | |
|     use m2::Foo::*;
 | |
| 
 | |
|     foo(); //~ ERROR cannot find function `foo` in this scope
 | |
|     m::foo(); //~ ERROR cannot find function `foo` in module `m`
 | |
|     bar(); //~ ERROR cannot find function `bar` in this scope
 | |
|     m::bar(); //~ ERROR cannot find function `bar` in module `m`
 | |
| }
 | 
