静态的

static 关键字声明了一个全局静态绑定,它可能是可变的。

static HELLO_WORLD: &'static str = "Hello, world!";

fn main() {
    println("{}", HELLO_WORLD);
}

这输出

Hello, world!