Skip to content

Commit

Permalink
test: Add a test for mods inside functions. Closes rust-lang#493
Browse files Browse the repository at this point in the history
  • Loading branch information
brson committed Jul 31, 2012
1 parent f78776e commit f6ce2bd
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/test/run-pass/mod-inside-fn.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
fn f() -> int {
mod m {
fn g() -> int { 720 }
}

m::g()
}

fn main() {
assert f() == 720;
}

0 comments on commit f6ce2bd

Please sign in to comment.