mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-26 13:01:27 +03:00
32 lines
1.0 KiB
Plaintext
32 lines
1.0 KiB
Plaintext
error[E0184]: the trait `Copy` cannot be implemented for this type; the type has a destructor
|
|
--> $DIR/copy-drop-mutually-exclusive.rs:4:8
|
|
|
|
|
LL | #[derive(Copy, Clone)]
|
|
| ---- in this derive macro expansion
|
|
LL | struct Foo;
|
|
| ^^^ `Copy` not allowed on types with destructors
|
|
|
|
|
note: destructor declared here
|
|
--> $DIR/copy-drop-mutually-exclusive.rs:7:5
|
|
|
|
|
LL | fn drop(&mut self) {}
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
error[E0184]: the trait `Copy` cannot be implemented for this type; the type has a destructor
|
|
--> $DIR/copy-drop-mutually-exclusive.rs:11:8
|
|
|
|
|
LL | #[derive(Copy, Clone)]
|
|
| ---- in this derive macro expansion
|
|
LL | struct Bar<T>(::std::marker::PhantomData<T>);
|
|
| ^^^ `Copy` not allowed on types with destructors
|
|
|
|
|
note: destructor declared here
|
|
--> $DIR/copy-drop-mutually-exclusive.rs:14:5
|
|
|
|
|
LL | fn drop(&mut self) {}
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0184`.
|