1
Fork 0

Make lint missing-copy-implementations honor negative Copy impls

This commit is contained in:
León Orell Valerian Liehr 2023-07-30 13:33:26 +02:00
parent 8131b9774e
commit 2b8a3b44bf
No known key found for this signature in database
GPG key ID: D17A07215F68E713
2 changed files with 38 additions and 0 deletions

View file

@ -0,0 +1,15 @@
// Regression test for issue #101980.
// Ensure that we don't suggest impl'ing `Copy` for a type if it already impl's `!Copy`.
// check-pass
#![feature(negative_impls)]
#![deny(missing_copy_implementations)]
pub struct Struct {
pub field: i32,
}
impl !Copy for Struct {}
fn main() {}