Skip to Content

Free programming tutorials

Learn Rust, C++ and TypeScript, step by step

Clear lessons with memory diagrams, runnable examples, and the real compiler errors you will hit along the way, with the fix for each one.

  • 29 lessons
  • 3 languages
  • Free, no sign-up

the first error nearly every new Rust programmer meets

src/main.rs
fn main() {    let pet1 = String::from("rusty");    let pet2 = pet1;     println!("My crab is {pet1}!");}

error[E0382]: borrow of moved value: `pet1`

  • line 3value moved here
  • line 5value borrowed here after move
Fixlet pet2 = pet1.clone();// or borrow it: &pet1

See why in the Ownership lesson

Tutorials

Choose a track

Every track starts from zero and adds one idea per lesson.

All 29 lessons

Rust compiler errors

Stuck on a compiler error?

The Rust lessons take these errors apart: why the compiler raises each one, and how to fix it.

Interactive tools

Try it in your browser

Small tools built into the articles. They run in your browser, with no sign-up.

Blog

Latest articles

All articles