Initial commit.

This commit is contained in:
rust-lang.xfoss.com
2023-03-27 14:33:48 +08:00
commit cf2b9a266c
266 changed files with 23587 additions and 0 deletions

8
functions/Cargo.toml Normal file
View File

@@ -0,0 +1,8 @@
[package]
name = "functions"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

9
functions/src/main.rs Normal file
View File

@@ -0,0 +1,9 @@
fn main() {
let x = plus_one(-1);
println! ("x 的值为:{}", x);
}
fn plus_one(x: i32) -> i32 {
x + 1
}