Rullst AcademyRullst Academy/Lesson
Rust: first sparks · Lesson 04 / 06

An error is a clue

The terminal did not show the expected message. Before changing things at random, read the clue the compiler left.

Learning paths6 min

Let's discover together

  1. 1

    The program declares seeds but tries to display seed. These are different names. Here, the compiler cannot find the second name and rejects this program.

  2. 2

    Fixing the name allows compilation. That does not guarantee the idea is right: a program can compile and perform a different sum from the one you intended.

  3. 3

    Read the message, locate the code and change one thing at a time. The error card gives a shortened explanation; the real compiler message has more detail.

✦
YOUR MISSION

Spot a mismatched name and distinguish a compilation error from an incorrect result.

Now it's your turn

Discovery workshop

One letter matters

Compare the names, then compare the expected results.
Mini experiment

Learning simulation: compare cards and check your predictions. The browser is not compiling Rust or starting a server.

fn main() { let seeds = 4; println!("{}", seed); }
Build your answers and check when you are ready.
A moment to understand

It compiled. Does that prove it does what you intended?

I need a hint

The compiler knows the language rules; tests help check your intention.

Loading your journey…

Take it with you

Tell someone about a time a clue helped you fix something. What changed after looking carefully?

Show me the Rust behind it

This part is optional. You don't need to memorize the code to continue.

fn main() { let seeds = 4; println!("{}", seeds); }
At your own pace

My files and GitHub

Every lesson can become your own record: code, notes or a practice plan. Saving a file to GitHub is optional and does not change your XP.

Student guide

The editor and downloads open when this lesson is available to your account. Check access below or return to the track map.

Checking your access to this lesson…

Rullstpetbot

AI can make mistakes. Check the lesson material.