Skip to content

Commit f6ce2bd

Browse files
committed
test: Add a test for mods inside functions. Closes #493
1 parent f78776e commit f6ce2bd

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/test/run-pass/mod-inside-fn.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
fn f() -> int {
2+
mod m {
3+
fn g() -> int { 720 }
4+
}
5+
6+
m::g()
7+
}
8+
9+
fn main() {
10+
assert f() == 720;
11+
}

0 commit comments

Comments
 (0)