// factorial fn fact(n: i32) -> i32 { if n < 2 { 1 } else { n * fact(n-1) } } fn main() { let n = 5; println!("Hello Rust! {}", fact(n)); } The Rust Project FAQより: What is this project's goal, in one sentence? To design and implement a safe, concurrent, practical, static systems language. 解説記事 (Rust 1.0以前での言語仕様変更は激しかったらしく、Web上で検索して出てきた記事内容を鵜呑みにしないほうがよさげ。1.0では既に廃止された仕様とかも相当あるみたい。) rust-lang.orgの公式ド