summaryrefslogtreecommitdiffstats
path: root/tests/ui/lint/forgetting_references.stderr
blob: 5624b690789f88d257cff55a16a3ad5b05fcd4c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
warning: calls to `std::mem::forget` with a reference instead of an owned value does nothing
  --> $DIR/forgetting_references.rs:10:5
   |
LL |     forget(&SomeStruct);
   |     ^^^^^^^-----------^
   |            |
   |            argument has type `&SomeStruct`
   |
   = note: use `let _ = ...` to ignore the expression or result
note: the lint level is defined here
  --> $DIR/forgetting_references.rs:3:9
   |
LL | #![warn(forgetting_references)]
   |         ^^^^^^^^^^^^^^^^^^^^^

warning: calls to `std::mem::forget` with a reference instead of an owned value does nothing
  --> $DIR/forgetting_references.rs:13:5
   |
LL |     forget(&owned);
   |     ^^^^^^^------^
   |            |
   |            argument has type `&SomeStruct`
   |
   = note: use `let _ = ...` to ignore the expression or result

warning: calls to `std::mem::forget` with a reference instead of an owned value does nothing
  --> $DIR/forgetting_references.rs:14:5
   |
LL |     forget(&&owned);
   |     ^^^^^^^-------^
   |            |
   |            argument has type `&&SomeStruct`
   |
   = note: use `let _ = ...` to ignore the expression or result

warning: calls to `std::mem::forget` with a reference instead of an owned value does nothing
  --> $DIR/forgetting_references.rs:15:5
   |
LL |     forget(&mut owned);
   |     ^^^^^^^----------^
   |            |
   |            argument has type `&mut SomeStruct`
   |
   = note: use `let _ = ...` to ignore the expression or result

warning: calls to `std::mem::forget` with a reference instead of an owned value does nothing
  --> $DIR/forgetting_references.rs:19:5
   |
LL |     forget(&*reference1);
   |     ^^^^^^^------------^
   |            |
   |            argument has type `&SomeStruct`
   |
   = note: use `let _ = ...` to ignore the expression or result

warning: calls to `std::mem::forget` with a reference instead of an owned value does nothing
  --> $DIR/forgetting_references.rs:22:5
   |
LL |     forget(reference2);
   |     ^^^^^^^----------^
   |            |
   |            argument has type `&mut SomeStruct`
   |
   = note: use `let _ = ...` to ignore the expression or result

warning: calls to `std::mem::forget` with a reference instead of an owned value does nothing
  --> $DIR/forgetting_references.rs:25:5
   |
LL |     forget(reference3);
   |     ^^^^^^^----------^
   |            |
   |            argument has type `&SomeStruct`
   |
   = note: use `let _ = ...` to ignore the expression or result

warning: calls to `std::mem::forget` with a reference instead of an owned value does nothing
  --> $DIR/forgetting_references.rs:30:5
   |
LL |     forget(&val);
   |     ^^^^^^^----^
   |            |
   |            argument has type `&T`
   |
   = note: use `let _ = ...` to ignore the expression or result

warning: calls to `std::mem::forget` with a reference instead of an owned value does nothing
  --> $DIR/forgetting_references.rs:38:5
   |
LL |     std::mem::forget(&SomeStruct);
   |     ^^^^^^^^^^^^^^^^^-----------^
   |                      |
   |                      argument has type `&SomeStruct`
   |
   = note: use `let _ = ...` to ignore the expression or result

warning: 9 warnings emitted