Incorrect span / broken rustfix: help: use dyn
: dyn #[dom_struct]
(original) (raw)
One of the many new (or newly enabled by default) warnings in Servo in today’s Nightly:
warning: trait objects without an explicit dyn
are deprecated
--> components/script/dom/window.rs:169:1
|
169 | #[dom_struct]
| ^^^^^^^^^^^^^ help: use dyn
: dyn #[dom_struct]
The suggestion is wrong, which means cargo fix
also fails and therefore does not apply fixes for (the many) other warnings where the suggestion is correct.
warning: failed to automatically apply fixes suggested by rustc to crate script
after fixes were automatically applied the compiler reported errors within these files:
- components/script/dom/dedicatedworkerglobalscope.rs
This likely indicates a bug in either rustc or cargo itself,
and we would appreciate a bug report! You're likely to see
a number of compiler warnings after this message which cargo
attempted to fix but failed. If you could open an issue at
https://github.com/rust-lang/rust/issues
quoting the full output of this command we'd be very appreciative!
Note that you may be able to make some more progress in the near-term
fixing code with the --broken-code
flag
The following errors were reported:
error: expected item, found keyword dyn
--> components/script/dom/dedicatedworkerglobalscope.rs:164:1
|
164 | dyn #[dom_struct]
| ^^^ expected item
error: aborting due to previous error
Original diagnostics will follow.