diff options
Diffstat (limited to 'tests/ui/hygiene/hygiene-dodging-1.rs')
-rw-r--r-- | tests/ui/hygiene/hygiene-dodging-1.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/hygiene/hygiene-dodging-1.rs b/tests/ui/hygiene/hygiene-dodging-1.rs new file mode 100644 index 000000000..69e47e82b --- /dev/null +++ b/tests/ui/hygiene/hygiene-dodging-1.rs @@ -0,0 +1,14 @@ +// run-pass +#![allow(unused_must_use)] + +mod x { + pub fn g() -> usize {14} +} + +pub fn main(){ + // should *not* shadow the module x: + let x = 9; + // use it to avoid warnings: + x+3; + assert_eq!(x::g(),14); +} |