Skip to content
Quiz · Structs · lesson 7 of 8

Quiz — {:?} without derive

What happens when this program is built and run?

Rust
struct P {
    x: i32,
}

fn main() {
    let p = P { x: 1 };
    println!("{} {:?}", p.x, p);
}