Allow tail expressions even in no_value blocks. Type checker

will guarantee they have unit type.
This commit is contained in:
Niko Matsakis
2011-12-29 12:03:39 -08:00
parent 43a9d50a74
commit 72a3667eb3
16 changed files with 97 additions and 55 deletions

View File

@@ -56,10 +56,10 @@ fn parse_companion_mod(cx: ctx, prefix: str, suffix: option::t<str>)
-> ([@ast::view_item], [@ast::item], [ast::attribute]) {
fn companion_file(prefix: str, suffix: option::t<str>) -> str {
alt suffix {
ret alt suffix {
option::some(s) { fs::connect(prefix, s) }
option::none. { prefix }
} + ".rs"
} + ".rs";
}
fn file_exists(path: str) -> bool {