Rust 1.30.1
0a6fb2cbb

# `const` and `static`

There is a new edition of the book and this is an old link.

> Constants are always immutable, and may only be set to a constant expression, not the result of a function call or any other value that could only be computed at runtime.

> Global variables are called `static` in Rust.

    const MAX_POINTS: u32 = 100_000;
    static HELLO_WORLD: &str = "Hello, world!";Run

Here are the relevant sections in the new and old books:

- In the second edition: Ch 3.01 — Variables and Mutability, section Constants
- In the second edition: Ch 19.01 — Unsafe Rust, section Static Variables
- In the first edition: Ch 3.26 — `const` and `static`