Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Because then there'd be ambiguity between a function ending and returning unit (nothing) or returning whatever the last line expression returns. You could change things around this, but Rust has a goal of unambiguous syntax, hence also the turbofish::<>


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: