Skip to content
Quiz · Generics and traits · lesson 7 of 8

Quiz — {} for a struct

What happens when this program is built and run?

Rust
#[derive(Debug)]
struct Meters(i32);

fn main() {
    let m = Meters(5);
    println!("{}", m);
}