Commit graph

12 commits

Author SHA1 Message Date
Samson
c0bee7cb86
Format toml files (#30112)
* Add taplo fmt config for toml fmt

* fmt toml files

* Add even-better-toml to extensions recommendations
2023-08-17 15:07:43 +00:00
Samson
9514f670d1
No tracing of nop traceable fields (#29926)
* Add `no_trace` option to JSTraceable derive

* NoTrace wrapper

* Port some types to no_trace schematics

* Fixing my unsafe mistakes (not tracing traceables)

* Add docs & safety guards for no_trace

Safety guards (trait shenanigans) guarantees safety usage of `no_trace`

* Port canvas_traits to no_trace

* Port servo_media to no_trace

* Port net_traits to no_trace

* Port style to no_trace

* Port webgpu to no_trace

* Port script_traits to no_trace

* Port canvas_traits, devtools_traits, embedder_traits, profile_traits to no_trace

* unrooted_must_root lint in seperate file

* Add trace_in_no_trace_lint as script_plugin

* Composable types in must_not_have_traceable

* Introduced HashMapTracedValues wrapper

* `HashMap<NoTrace<K>,V>`->`HashMapTracedValues<K,V>`

* Port rest of servo's types to no_trace

* Port html5ever, euclid, mime and http to no_trace

* Port remaining externals to no_trace

* Port webxr and Arc<Mutex<_>>

* Fix spelling in notrace doc
2023-08-04 10:17:43 +00:00
sagudev
9c2cc05a8e Upgrade remaining components to edition 2018 2023-02-18 09:42:37 +01:00
Simon Sapin
db4f27f361 Use the matches! macro from the standard library 2020-02-12 10:08:31 +01:00
Simon Sapin
bea73951db Use #![register_tool] instead of #![register_attr]
CC https://github.com/rust-lang/rust/issues/66079
2019-11-15 17:24:42 +01:00
Simon Sapin
47c269360c Remove redundant webidl_must_inherit compiler plugin lint
At first I was considering moving it to a procedural macro
(source-level information should be sufficient),
and started by trying to reproduce the error case
by changing `htmldivelement.rs` to use `Element` instead of `HTMLElement`
as the first field.

The output was:

```rust
error[E0308]: mismatched types
   --> /home/simon/servo2/target/debug/build/script-4caa244faca7d10f/out/Bindings/HTMLDivElementBinding.rs:665:31
    |
665 |         let _: &HTMLElement = self.as_parent();
    |                               ^^^^^^^^^^^^^^^^ expected struct `dom::htmlelement::HTMLElement`, found struct `dom::element::Element`
    |
    = note: expected type `&dom::htmlelement::HTMLElement`
               found type `&dom::element::Element`
```

This line number is inside a generated method called `__assert_parent_type`.
As far as I can tell, any case where this lint would error is already caught
by such methods. The lint is therefore redundant and can safely be removed.
2019-09-29 23:11:40 +02:00
Kagami Sascha Rosylight
01151274f1 Require default dictionary value for optional dicts 2019-07-12 12:16:09 +09:00
Bastien Orivel
13c632e739 Switch from webidl to weedle in script_plugins
This removes the dependency on lalrpop and should speed up compilation
quite a bit.
2019-05-15 23:03:25 +02:00
krk
ea833b597f Parse webidl files and lint for inheritance correctness. 2019-04-20 22:39:37 +02:00
krk
dfca8ec913 Can collect webidl paths. 2019-04-20 22:39:22 +02:00
Simon Sapin
a5d9d0b32d Make the unrooted_must_root conditional on a default Cargo feature.
Only http://perf.rust-lang.org/ will disable it,
in order to be less subject to changes to rustc internal APIs.
2017-11-02 15:08:04 +01:00
Anthony Ramine
3eed8a91a1 Move script lints to script_plugins
The plugins crate now just allows to hook into clippy from a single crate.
2017-02-16 18:37:14 +01:00