diff options
| author | Maybe Waffle <waffle.lapkin@gmail.com> | 2022-09-04 18:26:48 +0400 |
|---|---|---|
| committer | Maybe Waffle <waffle.lapkin@gmail.com> | 2022-09-04 20:04:51 +0400 |
| commit | fcd42d628cced5169ebbb791a992a8832d220ab6 (patch) | |
| tree | ed01e8b2ef371c3e2cabd340551d99aed730d40b /src | |
| parent | b11bf65e4aaa125952b6479a63f36e9e83efc32c (diff) | |
| download | rust-fcd42d628cced5169ebbb791a992a8832d220ab6.tar.gz rust-fcd42d628cced5169ebbb791a992a8832d220ab6.zip | |
Don't fire `rust_2021_incompatible_closure_captures` in edition = 2021
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/ui/lint/issue-101284.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/lint/issue-101284.rs b/src/test/ui/lint/issue-101284.rs new file mode 100644 index 00000000000..1381d4f1727 --- /dev/null +++ b/src/test/ui/lint/issue-101284.rs @@ -0,0 +1,15 @@ +// 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() {} |
