fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.2 KiB35 linesraw
1error[E0277]: the trait bound `T: Copy` is not satisfied
2  --> $DIR/explicit-drop-bounds.rs:27:18
3   |
4LL | impl<T> Drop for DropMe<T>
5   |                  ^^^^^^^^^ the trait `Copy` is not implemented for `T`
6   |
7note: required by a bound in `DropMe`
8  --> $DIR/explicit-drop-bounds.rs:7:18
9   |
10LL | struct DropMe<T: Copy>(T);
11   |                  ^^^^ required by this bound in `DropMe`
12help: consider further restricting type parameter `T`
13   |
14LL |     [T; 1]: Copy, T: std::marker::Copy // But `[T; 1]: Copy` does not imply `T: Copy`
15   |                 ~~~~~~~~~~~~~~~~~~~~~~
16
17error[E0277]: the trait bound `T: Copy` is not satisfied
18  --> $DIR/explicit-drop-bounds.rs:32:18
19   |
20LL |     fn drop(&mut self) {}
21   |                  ^^^^ the trait `Copy` is not implemented for `T`
22   |
23note: required by a bound in `DropMe`
24  --> $DIR/explicit-drop-bounds.rs:7:18
25   |
26LL | struct DropMe<T: Copy>(T);
27   |                  ^^^^ required by this bound in `DropMe`
28help: consider further restricting type parameter `T`
29   |
30LL |     [T; 1]: Copy, T: std::marker::Copy // But `[T; 1]: Copy` does not imply `T: Copy`
31   |                 ~~~~~~~~~~~~~~~~~~~~~~
32
33error: aborting due to 2 previous errors
34
35For more information about this error, try `rustc --explain E0277`.