Skip to content

Commit c126217

Browse files
committed
servo: Merge #18327 - Upgrade to rustc 1.21.0-nightly (7eeac1b81 2017-08-30) (from servo:rustup); r=nox
Fix this error in the new Rust Nightly: ```rust Compiling script v0.0.1 (file:///home/simon/servo2/components/script) error[E0599]: no method named `trace` found for type `&fn(&dom::node::Node) -> u16` in the current scope --> /home/simon/servo2/components/script/dom/treewalker.rs:464:10 | 464 | #[derive(JSTraceable)] | ^^^^^^^^^^^ | = note: JSTraceable is a function, perhaps you wish to call it = help: items from traits can only be used if the trait is implemented and in scope = note: the following trait defines an item `trace`, perhaps you need to implement it: candidate #1: `dom::bindings::trace::JSTraceable` error: aborting due to previous error error: Could not compile `script`. ``` ~I’ve tried to reproduce it in a minimal test case, but `impl<A, B> SomeTrait for fn(A) -> B` did not apply for `fn(&u32) -> u32` even on Rust 1.19.0 stable. So I don’t know what changed.~ This is very likely servo/servo#18327. Source-Repo: https://github.com/servo/servo Source-Revision: fd833d9f18cd9196502b9768ab0ac8c1498b2f68 UltraBlame original commit: 2093d5141fb21195b1f84894b2921bcace8c3cfd
1 parent fccc0c2 commit c126217

File tree

3 files changed

+45
-1
lines changed

3 files changed

+45
-1
lines changed

servo/components/script/dom/bindings/trace.rs

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3287,6 +3287,48 @@ nothing
32873287
unsafe
32883288
impl
32893289
<
3290+
'
3291+
a
3292+
A
3293+
B
3294+
>
3295+
JSTraceable
3296+
for
3297+
fn
3298+
(
3299+
&
3300+
A
3301+
)
3302+
-
3303+
>
3304+
B
3305+
{
3306+
#
3307+
[
3308+
inline
3309+
]
3310+
unsafe
3311+
fn
3312+
trace
3313+
(
3314+
&
3315+
self
3316+
_
3317+
:
3318+
*
3319+
mut
3320+
JSTracer
3321+
)
3322+
{
3323+
/
3324+
/
3325+
Do
3326+
nothing
3327+
}
3328+
}
3329+
unsafe
3330+
impl
3331+
<
32903332
T
32913333
>
32923334
JSTraceable

servo/components/script_plugins/utils.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,8 @@ i
293293
span
294294
.
295295
ctxt
296+
(
297+
)
296298
.
297299
outer
298300
(

servo/rust-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ nightly
44
-
55
08
66
-
7-
30
7+
31

0 commit comments

Comments
 (0)