]> git.lizzy.rs Git - rust.git/blob - tests/ui/crashes/ice-2865.rs
Auto merge of #6298 - JohnTitor:fix-example, r=llogiq
[rust.git] / tests / ui / crashes / ice-2865.rs
1 #[allow(dead_code)]
2
3 /// Test for https://github.com/rust-lang/rust-clippy/issues/2865
4
5 struct Ice {
6     size: String,
7 }
8
9 impl<'a> From<String> for Ice {
10     fn from(_: String) -> Self {
11         let text = || "iceberg".to_string();
12         Self { size: text() }
13     }
14 }
15
16 fn main() {}