resolve test case
resolve must ignore syntax context when comparing module names
This commit is contained in:
parent
7668fb2c75
commit
fb82283a98
1 changed files with 11 additions and 0 deletions
11
src/test/run-pass/hygiene-dodging-1.rs
Normal file
11
src/test/run-pass/hygiene-dodging-1.rs
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
mod x {
|
||||||
|
pub fn g() -> uint {14}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main(){
|
||||||
|
// should *not* shadow the module x:
|
||||||
|
let x = 9;
|
||||||
|
// use it to avoid warnings:
|
||||||
|
x+3;
|
||||||
|
assert_eq!(x::g(),14);
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue