rust/tests/ui/lint/issue-101284.rs

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

16 lines
251 B
Rust
Raw Normal View History

//@ check-pass
//@ edition:2021
#![deny(rust_2021_compatibility)]
pub struct Warns {
// `Arc` has significant drop
_significant_drop: std::sync::Arc<()>,
field: String,
}
pub fn test(w: Warns) {
_ = || drop(w.field);
}
fn main() {}