Loading tutorials
cargo build and cargo run, and that you can read the parts of a rustc diagnostic: the error code, message, labels, and help text. You don't need to know how to fix any particular error yet. The goal here is a repeatable workflow that you can apply to every error 6 min readcargo check and cargo build, and that you have seen a rustc diagnostic with its message and source labels. You also need a first idea of ownership and references. Here you learn what the error code in a diagnostic is, how to look it up offline, and how to use it 6 min readcargo check. It also assumes you know Rust's basic types, Option, Result, and String versus &str.5 min readlet bindings, functions, and mod declarations, and that you can run cargo check. The goal is to turn "cannot find ..." and "unresolved import ..." errors into a short l5 min readlet bindings, function parameters, structs, and references, and with the basic idea of & and &mut. The chapter also assumes you can read the parts 6 min read& and &mut mean and how a move works. The aim is to explain why the borrow checker rejects a program, so you can pick a fix on purpose instead of by trial and error.4 min read#[derive] works. If the layout of a diagnostic is unfamiliar, review the chapter on diagnostic anatomy first.4 min readmatch, and that you can run cargo check. It covers error E0004, the compiler's report that a match does not handle every possible value. You will learn to read the message, choose a fix, and avoid fixes that hide future bugs.5 min readcargo check, and use git to commit and diff. It covers when to trust a compiler suggestion, how cargo fix applies suggestions automatically, and how to review the result.5 min readcargo check. It also assumes you know the common error families: moves, borrows, lifetimes, and trait bounds. A minimal reproduction is the smallest complete program that still produces t6 min read