diff --git a/src/test/run-pass/mod-inside-fn.rs b/src/test/run-pass/mod-inside-fn.rs new file mode 100644 index 0000000000000..96c7101cdc391 --- /dev/null +++ b/src/test/run-pass/mod-inside-fn.rs @@ -0,0 +1,11 @@ +fn f() -> int { + mod m { + fn g() -> int { 720 } + } + + m::g() +} + +fn main() { + assert f() == 720; +} \ No newline at end of file