rust/tests/ui/hygiene/hygiene-dodging-1.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
223 B
Rust
Raw Normal View History

//@ run-pass
#![allow(unused_must_use)]
mod x {
pub fn g() -> usize {14}
}
pub fn main(){
// should *not* shadow the module x:
2015-01-25 21:05:03 +00:00
let x = 9;
// use it to avoid warnings:
x+3;
assert_eq!(x::g(),14);
}