The resolution rules are not well documented in Rust doc, the rustc relies on [librustc_resolve](https://github.com/rust-lang/rust/tree/master/src/librustc_resolve). I'm going to list all the rules here (or wiki) for the reference.