Files
rust/tests/ui/dropck/explicit-drop-bounds.bad2.stderr

52 lines
1.7 KiB
Plaintext
Raw Normal View History

2023-04-21 18:04:39 +00:00
error[E0277]: the trait bound `T: Copy` is not satisfied
--> $DIR/explicit-drop-bounds.rs:41:5
2023-04-21 18:04:39 +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`
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
--> $DIR/explicit-drop-bounds.rs:38:18
2025-05-01 16:31:47 +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) {}
| ^^^^ 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`
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`.