rust/tests/ui/suggestions/issue-52820.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
261 B
Rust
Raw Normal View History

2022-07-10 12:19:45 -05:00
// 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
};
}