fork/rust

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

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

master
1.8 KiB50 linesraw
1error: bounds on `T: Drop` are most likely incorrect, consider instead using `std::mem::needs_drop` to detect whether a type can be trivially dropped
2  --> $DIR/drop-bounds.rs:2:11
3   |
4LL | fn foo<T: Drop>() {}
5   |           ^^^^
6   |
7note: the lint level is defined here
8  --> $DIR/drop-bounds.rs:1:9
9   |
10LL | #![deny(drop_bounds)]
11   |         ^^^^^^^^^^^
12
13error: bounds on `U: Drop` are most likely incorrect, consider instead using `std::mem::needs_drop` to detect whether a type can be trivially dropped
14  --> $DIR/drop-bounds.rs:5:8
15   |
16LL |     U: Drop,
17   |        ^^^^
18
19error: bounds on `impl Drop: Drop` are most likely incorrect, consider instead using `std::mem::needs_drop` to detect whether a type can be trivially dropped
20  --> $DIR/drop-bounds.rs:8:17
21   |
22LL | fn baz(_x: impl Drop) {}
23   |                 ^^^^
24
25error: bounds on `T: Drop` are most likely incorrect, consider instead using `std::mem::needs_drop` to detect whether a type can be trivially dropped
26  --> $DIR/drop-bounds.rs:9:15
27   |
28LL | struct Foo<T: Drop> {
29   |               ^^^^
30
31error: bounds on `U: Drop` are most likely incorrect, consider instead using `std::mem::needs_drop` to detect whether a type can be trivially dropped
32  --> $DIR/drop-bounds.rs:12:24
33   |
34LL | struct Bar<U> where U: Drop {
35   |                        ^^^^
36
37error: bounds on `Self: Drop` are most likely incorrect, consider instead using `std::mem::needs_drop` to detect whether a type can be trivially dropped
38  --> $DIR/drop-bounds.rs:15:12
39   |
40LL | trait Baz: Drop {
41   |            ^^^^
42
43error: bounds on `T: Drop` are most likely incorrect, consider instead using `std::mem::needs_drop` to detect whether a type can be trivially dropped
44  --> $DIR/drop-bounds.rs:17:9
45   |
46LL | impl<T: Drop> Baz for T {
47   |         ^^^^
48
49error: aborting due to 7 previous errors
50