-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Closed
Copy link
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.F-negative_impls#![feature(negative_impls)]#![feature(negative_impls)]
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
scottmcm and Noratrieb
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.Category: This is a bug.F-negative_impls#![feature(negative_impls)]#![feature(negative_impls)]