~/talk

The Rust Borrow Checker: A Deep Dive

Talkat RustLab 2021 · 2021-03-18..09-23· [rust]
slides:none on file

Explains how the compiler lowers source via HIR to MIR and runs the borrow checker during semantic analysis, where it tracks initializations and moves and rejects use-after-move errors; shows a concrete example where moving a String into y makes x uninitialized, then switching to a reference prints "hi rustlab" twice; describes lifetime inference, how borrows must not outlive owners, and that the checker shows source spans and actionable suggestions and integrates with cargo/LLVM.

AI-written summary · about

  1. 0:00Start
  2. 1:41Who I Am
  3. 2:15Background on the Rust Compiler
  4. 3:14General Stages to Compiling a Piece of Code
  5. 4:32Lexical Analysis
  6. 4:52Parsing
  7. 6:46Data Structures
  8. 11:35The Rust Compiler Semantic Analysis
  9. 14:27How the Borrow Checker Identified this Error
  10. 17:55Lifetime Inference
  11. 21:27Is the Borrow Checker a Friend or a Foe
  12. 22:21Qa
  13. 22:53How Do I Get Started Contributing to the Compiler
  14. 24:25What Do You Think about the Current Attempt To Leverage Gcc To Compile Rust
  15. 25:09Do You Believe the Example of the Rust Borrow Checker Will Inspire Other Existing Languages Maybe Even Dynamically Typed or Interpreted
  16. 28:30Are There Resources You Would Recommend or Reports with Examples for More Complex Scenarios To Better Understand Borrowing and Related Issues
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.