2023-04-21 18:04:39 +00:00
|
|
|
error[E0277]: the trait bound `T: Copy` is not satisfied
|
2025-06-04 08:46:49 +00:00
|
|
|
--> $DIR/explicit-drop-bounds.rs:41:5
|
2023-04-21 18:04:39 +00:00
|
|
|
|
|
2025-06-04 08:46:49 +00:00
|
|
|
LL | fn drop(&mut self) {}
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `T`
|
2023-04-21 18:04:39 +00:00
|
|
|
|
|
|
|
|
|
note: required by a bound in `DropMe`
|
|
|
|
|
--> $DIR/explicit-drop-bounds.rs:7:18
|
|
|
|
|
|
|
|
|
|
|
LL | struct DropMe<T: Copy>(T);
|
|
|
|
|
| ^^^^ required by this bound in `DropMe`
|
2024-11-28 20:22:46 +00:00
|
|
|
help: consider restricting type parameter `T` with trait `Copy`
|
2023-04-21 18:04:39 +00:00
|
|
|
|
|
|
|
|
|
LL | impl<T: std::marker::Copy> Drop for DropMe<T>
|
|
|
|
|
| +++++++++++++++++++
|
|
|
|
|
|
|
|
|
|
error[E0277]: the trait bound `T: Copy` is not satisfied
|
2025-06-04 08:46:49 +00:00
|
|
|
--> $DIR/explicit-drop-bounds.rs:38:18
|
2025-05-01 16:31:47 +00:00
|
|
|
|
|
2025-06-04 08:46:49 +00:00
|
|
|
LL | impl<T> Drop for DropMe<T>
|
|
|
|
|
| ^^^^^^^^^ the trait `Copy` is not implemented for `T`
|
2025-05-01 16:31:47 +00:00
|
|
|
|
|
|
|
|
|
note: required by a bound in `DropMe`
|
|
|
|
|
--> $DIR/explicit-drop-bounds.rs:7:18
|
|
|
|
|
|
|
|
|
|
|
LL | struct DropMe<T: Copy>(T);
|
|
|
|
|
| ^^^^ required by this bound in `DropMe`
|
|
|
|
|
help: consider restricting type parameter `T` with trait `Copy`
|
|
|
|
|
|
|
|
|
|
|
LL | impl<T: std::marker::Copy> Drop for DropMe<T>
|
|
|
|
|
| +++++++++++++++++++
|
|
|
|
|
|
|
|
|
|
error[E0277]: the trait bound `T: Copy` is not satisfied
|
|
|
|
|
--> $DIR/explicit-drop-bounds.rs:41:18
|
2023-04-21 18:04:39 +00:00
|
|
|
|
|
|
|
|
|
LL | fn drop(&mut self) {}
|
2023-06-10 22:36:28 +00:00
|
|
|
| ^^^^ the trait `Copy` is not implemented for `T`
|
2023-04-21 18:04:39 +00:00
|
|
|
|
|
|
|
|
|
note: required by a bound in `DropMe`
|
|
|
|
|
--> $DIR/explicit-drop-bounds.rs:7:18
|
|
|
|
|
|
|
|
|
|
|
LL | struct DropMe<T: Copy>(T);
|
|
|
|
|
| ^^^^ required by this bound in `DropMe`
|
2024-11-28 20:22:46 +00:00
|
|
|
help: consider restricting type parameter `T` with trait `Copy`
|
2023-04-21 18:04:39 +00:00
|
|
|
|
|
|
|
|
|
LL | impl<T: std::marker::Copy> Drop for DropMe<T>
|
|
|
|
|
| +++++++++++++++++++
|
|
|
|
|
|
2025-05-01 16:31:47 +00:00
|
|
|
error: aborting due to 3 previous errors
|
2023-04-21 18:04:39 +00:00
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|