2017-08-11 02:15:28 -05:00
|
|
|
fn main() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let x = 1;
|
|
|
|
|
|
|
|
|
2017-12-05 02:45:19 -06:00
|
|
|
let y = 2;
|
|
|
|
|
|
|
|
|
|
|
|
println!("x + y = {}", x + y);
|
|
|
|
|
2017-08-11 02:15:28 -05:00
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2017-12-05 02:45:19 -06:00
|
|
|
|
2017-08-11 02:15:28 -05:00
|
|
|
fn foo() {
|
|
|
|
|
|
|
|
#![attribute]
|
|
|
|
|
|
|
|
let x = 1;
|
|
|
|
|
|
|
|
// comment
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2017-12-05 02:45:19 -06:00
|
|
|
// comment after item
|
|
|
|
|
|
|
|
|
|
|
|
// comment before item
|
|
|
|
fn bar() {
|
|
|
|
let x = 1;
|
|
|
|
// comment after statement
|
|
|
|
|
|
|
|
|
2018-10-18 17:44:14 -05:00
|
|
|
// comment before statement
|
2017-12-05 02:45:19 -06:00
|
|
|
let y = 2;
|
|
|
|
let z = 3;
|
|
|
|
|
|
|
|
|
|
|
|
println!("x + y + z = {}", x + y + z);
|
|
|
|
}
|