Rust 1.76.0
07dca489a

# Primitive Types

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

> Rust is a statically typed language, which means that it must know the types of all variables at compile time. The compiler can usually infer what type we want to use based on the value and how we use it. In cases when many types are possible, a type annotation must be added.

    let x = 2.0; // f64

    let y: f32 = 3.0; // f32

Run

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

- in the current edition: Ch 3.02 — Data Types
- In the first edition: Ch 3.3 — Primitive Types