mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
16 lines
251 B
Rust
16 lines
251 B
Rust
//@ 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() {}
|