1
- warning: calls to `std::mem::drop` with a reference instead of an owned value
1
+ warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing
2
2
--> $DIR/drop_ref.rs:8:5
3
3
|
4
4
LL | drop(&SomeStruct);
@@ -12,87 +12,87 @@ note: the lint level is defined here
12
12
LL | #![warn(drop_ref)]
13
13
| ^^^^^^^^
14
14
15
- warning: calls to `std::mem::drop` with a reference instead of an owned value
15
+ warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing
16
16
--> $DIR/drop_ref.rs:11:5
17
17
|
18
18
LL | drop(&owned1);
19
19
| ^^^^^-------^
20
20
| |
21
21
| argument has type `&SomeStruct`
22
22
23
- warning: calls to `std::mem::drop` with a reference instead of an owned value
23
+ warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing
24
24
--> $DIR/drop_ref.rs:12:5
25
25
|
26
26
LL | drop(&&owned1);
27
27
| ^^^^^--------^
28
28
| |
29
29
| argument has type `&&SomeStruct`
30
30
31
- warning: calls to `std::mem::drop` with a reference instead of an owned value
31
+ warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing
32
32
--> $DIR/drop_ref.rs:13:5
33
33
|
34
34
LL | drop(&mut owned1);
35
35
| ^^^^^-----------^
36
36
| |
37
37
| argument has type `&mut SomeStruct`
38
38
39
- warning: calls to `std::mem::drop` with a reference instead of an owned value
39
+ warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing
40
40
--> $DIR/drop_ref.rs:17:5
41
41
|
42
42
LL | drop(reference1);
43
43
| ^^^^^----------^
44
44
| |
45
45
| argument has type `&SomeStruct`
46
46
47
- warning: calls to `std::mem::drop` with a reference instead of an owned value
47
+ warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing
48
48
--> $DIR/drop_ref.rs:20:5
49
49
|
50
50
LL | drop(reference2);
51
51
| ^^^^^----------^
52
52
| |
53
53
| argument has type `&mut SomeStruct`
54
54
55
- warning: calls to `std::mem::drop` with a reference instead of an owned value
55
+ warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing
56
56
--> $DIR/drop_ref.rs:23:5
57
57
|
58
58
LL | drop(reference3);
59
59
| ^^^^^----------^
60
60
| |
61
61
| argument has type `&SomeStruct`
62
62
63
- warning: calls to `std::mem::drop` with a reference instead of an owned value
63
+ warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing
64
64
--> $DIR/drop_ref.rs:28:5
65
65
|
66
66
LL | drop(&val);
67
67
| ^^^^^----^
68
68
| |
69
69
| argument has type `&T`
70
70
71
- warning: calls to `std::mem::drop` with a reference instead of an owned value
71
+ warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing
72
72
--> $DIR/drop_ref.rs:36:5
73
73
|
74
74
LL | std::mem::drop(&SomeStruct);
75
75
| ^^^^^^^^^^^^^^^-----------^
76
76
| |
77
77
| argument has type `&SomeStruct`
78
78
79
- warning: calls to `std::mem::drop` with a reference instead of an owned value
79
+ warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing
80
80
--> $DIR/drop_ref.rs:91:13
81
81
|
82
82
LL | drop(println_and(&13));
83
83
| ^^^^^----------------^
84
84
| |
85
85
| argument has type `&i32`
86
86
87
- warning: calls to `std::mem::drop` with a reference instead of an owned value
87
+ warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing
88
88
--> $DIR/drop_ref.rs:94:14
89
89
|
90
90
LL | 3 if drop(println_and(&14)) == () => (),
91
91
| ^^^^^----------------^
92
92
| |
93
93
| argument has type `&i32`
94
94
95
- warning: calls to `std::mem::drop` with a reference instead of an owned value
95
+ warning: calls to `std::mem::drop` with a reference instead of an owned value does nothing
96
96
--> $DIR/drop_ref.rs:96:14
97
97
|
98
98
LL | 4 => drop(&2),
0 commit comments