Closed
Description
I would expect the following code to compile successfully since we explicitly opt out of implementing Copy
:
#![feature(negative_impls)]
#![deny(missing_copy_implementations)]
#![crate_type = "lib"]
pub struct Struct {
pub field: i32,
}
impl !Copy for Struct {}
However, the code fails to compile with the following error message:
error: type could implement `Copy`; consider adding `impl Copy`
--> src/lib.rs:5:1
|
5 | / pub struct Struct {
6 | | pub field: i32,
7 | | }
| |_^
|
note: the lint level is defined here
--> src/lib.rs:2:9
|
2 | #![deny(missing_copy_implementations)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@rustbot label C-bug A-lint F-negative_impls