]> git.lizzy.rs Git - rust.git/blob - src/test/ui/hygiene/hygiene-dodging-1.rs
Rollup merge of #90202 - matthewjasper:xcrate-hygiene, r=petrochenkov
[rust.git] / src / test / ui / hygiene / hygiene-dodging-1.rs
1 // run-pass
2 #![allow(unused_must_use)]
3
4 mod x {
5     pub fn g() -> usize {14}
6 }
7
8 pub fn main(){
9     // should *not* shadow the module x:
10     let x = 9;
11     // use it to avoid warnings:
12     x+3;
13     assert_eq!(x::g(),14);
14 }