Compiler Errors in rustc: A UX Perspective
summary
Argues that excellent Rust compiler errors come from preserving source spans across AST → HIR → MIR, interning them in a source map so diagnostics can point back to original bytes, and from a small API surface like struct_span_error returning a DiagnosticBuilder plus help and suggestion helpers. Notes borrow checking moves to MIR, offers span_suggestion with applicability, and shows that cargo fix (machine‑applicable suggestions) automates large codebase migrations and actually works.
AI-written summary · about
chapters (8)
- 0:00Start
- 2:09Rust isn't easy
- 3:46Languages compete on UX
- 5:54Standards have risen
- 11:20Compiler internals Overview
- 21:04The problem with lowering
- 23:15Compiler sessions
- 36:14Conclusion
related talks
31mThe Anatomy of Error Messages in Rust
26mFriendly Ferris: Developing Kind Compiler Errors
38mThe Rust Borrow Checker: a Deep Dive
25m"Compiler-Driven Development: Making Rust Work for You"
36mThe Rust Borrow Checker: A Deep Dive
58mRust for The Curious C++ Developers
22mThe Rust Borrow Checker - A Deep Dive
40mWe deserve helpful tools
