Skip to content

Commit 5f88ce6

Browse files
committed
servo: Merge #6156 - Fix deprecated plugin APIs (from Manishearth:warn_fix); r=larsbergstrom
r? larsbergstrom (The diff is borked here, but I only just added `if let`s and wrapped/unwrapped in `Annotatable`s) Source-Repo: https://github.com/servo/servo Source-Revision: ef7fa99bd2c4ff52be1c6361d9f1eca3775c88c5 UltraBlame original commit: 4a8fec2dd4440efa5dce413398d99e72ce839248
1 parent bfeea20 commit 5f88ce6

File tree

3 files changed

+78
-34
lines changed

3 files changed

+78
-34
lines changed

servo/components/plugins/jstraceable.rs

Lines changed: 46 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ ast
3939
:
4040
:
4141
{
42-
Item
4342
MetaItem
4443
Expr
4544
}
@@ -95,26 +94,32 @@ cx
9594
&
9695
mut
9796
ExtCtxt
98-
_
97+
sp
9998
:
10099
Span
101100
_
102101
:
103102
&
104103
MetaItem
105-
item
104+
anno
106105
:
107-
P
108-
<
109-
Item
110-
>
106+
Annotatable
111107
)
112108
-
113109
>
114-
P
115-
<
110+
Annotatable
111+
{
112+
if
113+
let
114+
Annotatable
115+
:
116+
:
116117
Item
117-
>
118+
(
119+
item
120+
)
121+
=
122+
anno
118123
{
119124
let
120125
mut
@@ -214,10 +219,41 @@ _dom_struct_marker
214219
)
215220
)
216221
;
222+
Annotatable
223+
:
224+
:
225+
Item
226+
(
217227
P
218228
(
219229
item2
220230
)
231+
)
232+
}
233+
else
234+
{
235+
cx
236+
.
237+
span_err
238+
(
239+
sp
240+
"
241+
#
242+
[
243+
dom_struct
244+
]
245+
applied
246+
to
247+
something
248+
other
249+
than
250+
a
251+
struct
252+
"
253+
)
254+
;
255+
anno
256+
}
221257
}
222258
pub
223259
fn

servo/components/plugins/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ intern
118118
dom_struct
119119
"
120120
)
121-
Modifier
121+
MultiModifier
122122
(
123123
box
124124
jstraceable
@@ -158,7 +158,7 @@ intern
158158
_generate_reflector
159159
"
160160
)
161-
Decorator
161+
MultiDecorator
162162
(
163163
box
164164
reflector

servo/components/plugins/reflector.rs

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ ext
88
base
99
:
1010
:
11+
{
12+
Annotatable
1113
ExtCtxt
14+
}
1215
;
1316
use
1417
syntax
@@ -23,22 +26,10 @@ use
2326
syntax
2427
:
2528
:
26-
ptr
27-
:
28-
:
29-
P
30-
;
31-
use
32-
syntax
33-
:
34-
:
3529
ast
3630
:
3731
:
38-
{
39-
Item
4032
MetaItem
41-
}
4233
;
4334
use
4435
syntax
@@ -68,26 +59,30 @@ _
6859
:
6960
&
7061
MetaItem
71-
item
62+
annotatable
7263
:
73-
&
74-
Item
64+
Annotatable
7565
push
7666
:
7767
&
7868
mut
7969
FnMut
8070
(
81-
P
82-
<
83-
Item
84-
>
71+
Annotatable
8572
)
86-
-
87-
>
88-
(
8973
)
74+
{
75+
if
76+
let
77+
Annotatable
78+
:
79+
:
80+
Item
81+
(
82+
item
9083
)
84+
=
85+
annotatable
9186
{
9287
if
9388
let
@@ -245,9 +240,15 @@ it
245240
|
246241
push
247242
(
243+
Annotatable
244+
:
245+
:
246+
Item
247+
(
248248
it
249249
)
250250
)
251+
)
251252
}
252253
None
253254
=
@@ -342,9 +343,15 @@ it
342343
|
343344
push
344345
(
346+
Annotatable
347+
:
348+
:
349+
Item
350+
(
345351
it
346352
)
347353
)
354+
)
348355
}
349356
}
350357
;
@@ -376,3 +383,4 @@ struct
376383
;
377384
}
378385
}
386+
}

0 commit comments

Comments
 (0)