mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 07:00:55 +00:00
b545f1c3bb
compiletest UI tests do not fail when encountering panics and ICEs unless the `// run-pass` flag is used. (This was forgotten in https://github.com/rust-lang/rust-clippy/pull/3743)
18 lines
297 B
Rust
18 lines
297 B
Rust
// run-pass
|
|
|
|
#[allow(dead_code)]
|
|
|
|
/// Test for https://github.com/rust-lang/rust-clippy/issues/2865
|
|
|
|
struct Ice {
|
|
size: String,
|
|
}
|
|
|
|
impl<'a> From<String> for Ice {
|
|
fn from(_: String) -> Self {
|
|
let text = || "iceberg".to_string();
|
|
Self { size: text() }
|
|
}
|
|
}
|
|
|
|
fn main() {}
|