aboutsummaryrefslogtreecommitdiff
path: root/tests/ui/pinned_drop/invalid.stderr
blob: d509964b24f3eda4d9dcd0509125a9e09fa9bd98 (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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
error: unexpected token: `foo`
 --> tests/ui/pinned_drop/invalid.rs:9:19
  |
9 |     #[pinned_drop(foo)] //~ ERROR unexpected token
  |                   ^^^

error: duplicate #[pinned_drop] attribute
  --> tests/ui/pinned_drop/invalid.rs:30:5
   |
30 |     #[pinned_drop] //~ ERROR duplicate #[pinned_drop] attribute
   |     ^^^^^^^^^^^^^^

error: #[pinned_drop] may only be used on implementation for the `PinnedDrop` trait
  --> tests/ui/pinned_drop/invalid.rs:43:10
   |
43 |     impl Drop for TraitImpl {} //~ ERROR may only be used on implementation for the `PinnedDrop` trait
   |          ^^^^

error: #[pinned_drop] may only be used on implementation for the `PinnedDrop` trait
  --> tests/ui/pinned_drop/invalid.rs:49:10
   |
49 |     impl InherentImpl {} //~ ERROR may only be used on implementation for the `PinnedDrop` trait
   |          ^^^^^^^^^^^^

error: expected `impl`
  --> tests/ui/pinned_drop/invalid.rs:52:5
   |
52 |     fn func(_: Pin<&mut ()>) {} //~ ERROR expected `impl`
   |     ^^

error: implementing the trait `PinnedDrop` is not unsafe
  --> tests/ui/pinned_drop/invalid.rs:62:5
   |
62 |     unsafe impl PinnedDrop for Impl {
   |     ^^^^^^

error: implementing the method `drop` is not unsafe
  --> tests/ui/pinned_drop/invalid.rs:72:9
   |
72 |         unsafe fn drop(self: Pin<&mut Self>) {} //~ ERROR implementing the method `drop` is not unsafe
   |         ^^^^^^

error: not all trait items implemented, missing: `drop`
  --> tests/ui/pinned_drop/invalid.rs:83:5
   |
83 |     impl PinnedDrop for Empty {} //~ ERROR not all trait items implemented, missing: `drop`
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: const `A` is not a member of trait `PinnedDrop`
  --> tests/ui/pinned_drop/invalid.rs:90:9
   |
90 |         const A: u8 = 0; //~ ERROR const `A` is not a member of trait `PinnedDrop`
   |         ^^^^^^^^^^^^^^^^

error: const `A` is not a member of trait `PinnedDrop`
   --> tests/ui/pinned_drop/invalid.rs:100:9
    |
100 |         const A: u8 = 0; //~ ERROR const `A` is not a member of trait `PinnedDrop`
    |         ^^^^^^^^^^^^^^^^

error: type `A` is not a member of trait `PinnedDrop`
   --> tests/ui/pinned_drop/invalid.rs:108:9
    |
108 |         type A = u8; //~ ERROR type `A` is not a member of trait `PinnedDrop`
    |         ^^^^^^^^^^^^

error: type `A` is not a member of trait `PinnedDrop`
   --> tests/ui/pinned_drop/invalid.rs:118:9
    |
118 |         type A = u8; //~ ERROR type `A` is not a member of trait `PinnedDrop`
    |         ^^^^^^^^^^^^

error: duplicate definitions with name `drop`
   --> tests/ui/pinned_drop/invalid.rs:127:9
    |
127 |         fn drop(self: Pin<&mut Self>) {} //~ ERROR duplicate definitions with name `drop`
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: method `drop` must return the unit type
   --> tests/ui/pinned_drop/invalid.rs:149:42
    |
149 |         fn drop(self: Pin<&mut Self>) -> Self {} //~ ERROR method `drop` must return the unit type
    |                                          ^^^^

error: method `drop` must take an argument `self: Pin<&mut Self>`
   --> tests/ui/pinned_drop/invalid.rs:157:16
    |
157 |         fn drop() {} //~ ERROR method `drop` must take an argument `self: Pin<&mut Self>`
    |                ^^

error: method `drop` must take an argument `self: Pin<&mut Self>`
   --> tests/ui/pinned_drop/invalid.rs:165:17
    |
165 |         fn drop(self: Pin<&mut Self>, _: ()) {} //~ ERROR method `drop` must take an argument `self: Pin<&mut Self>`
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: method `drop` must take an argument `self: Pin<&mut Self>`
   --> tests/ui/pinned_drop/invalid.rs:173:17
    |
173 |         fn drop(&mut self) {} //~ ERROR method `drop` must take an argument `self: Pin<&mut Self>`
    |                 ^^^^^^^^^

error: method `drop` must take an argument `self: Pin<&mut Self>`
   --> tests/ui/pinned_drop/invalid.rs:181:17
    |
181 |         fn drop(_: Pin<&mut Self>) {} //~ ERROR method `drop` must take an argument `self: Pin<&mut Self>`
    |                 ^^^^^^^^^^^^^^^^^

error: method `drop` must take an argument `self: Pin<&mut Self>`
   --> tests/ui/pinned_drop/invalid.rs:189:17
    |
189 |         fn drop(self: Pin<&Self>) {} //~ ERROR method `drop` must take an argument `self: Pin<&mut Self>`
    |                 ^^^^^^^^^^^^^^^^

error: method `drop` must take an argument `self: Pin<&mut Self>`
   --> tests/ui/pinned_drop/invalid.rs:197:17
    |
197 |         fn drop(self: Pin<&mut ()>) {} //~ ERROR method `drop` must take an argument `self: Pin<&mut Self>`
    |                 ^^^^^^^^^^^^^^^^^^

error: method `pinned_drop` is not a member of trait `PinnedDrop
   --> tests/ui/pinned_drop/invalid.rs:205:12
    |
205 |         fn pinned_drop(self: Pin<&mut Self>) {} //~ ERROR method `pinned_drop` is not a member of trait `PinnedDrop
    |            ^^^^^^^^^^^

error: implementing the trait `PinnedDrop` on this type is unsupported
   --> tests/ui/pinned_drop/invalid.rs:213:25
    |
213 |     impl PinnedDrop for () {
    |                         ^^

error: implementing the trait `PinnedDrop` on this type is unsupported
   --> tests/ui/pinned_drop/invalid.rs:219:25
    |
219 |     impl PinnedDrop for &mut A {
    |                         ^^^^^^

error: implementing the trait `PinnedDrop` on this type is unsupported
   --> tests/ui/pinned_drop/invalid.rs:225:25
    |
225 |     impl PinnedDrop for [A] {
    |                         ^^^