quest

Sign in to start training

quest keeps your progress, streaks, and scores tied to your account — so you can pick up on any device.

Synced everywhere. Progress follows you across laptop and phone.
Streaks & stats. See your daily run and every score over time.
Your profile. A name and avatar for the work you do here.

We only use Google to sign you in and sync progress. No posting, no contacts — ever.

Core Advanced

11  Lifetimes

When a function or struct hands out a reference, the compiler needs to know how long it stays valid. Add the annotations that make these compile.

Step 2 / 2

Annotate the Excerpt struct so it can hold a borrowed &str.

Hints
  • A struct holding a reference declares one too: struct Excerpt<'a> { part: &'a str }.
11_lifetimes.rs
Reset to starterCompiled in a sandbox; hidden checks must pass.
Reveal solution
struct Excerpt<'a> {
    part: &'a str,
}