1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
// run-rustfix #![allow(dead_code)] struct Bravery { guts: String, brains: String, } fn main() { let guts = "mettle"; let _ = Bravery { guts, //~ ERROR mismatched types brains: guts.clone(), //~ ERROR mismatched types }; }