← Back to archive

Stdle #65 · classes · 2026-08-10

What does this Rust snippet output?

A past puzzle — fully playable. 4 attempts, hints on wrong guesses.

trait Sized2 {
fn base(&self) -> u32 { 10 }
fn total(&self) -> u32 { self.base() + 5 }
}
struct Big;
impl Sized2 for Big {
fn base(&self) -> u32 { 100 }
}
fn main() {
println!("{}", Big.total());
}
Classes
4 attempts left

Answer & explanation