Commit graph

119 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
450f8193a5
Use mozjs tracing infrastructure (#29918)
* Update mozjs

64711ec2e6 also fixes https://github.com/servo/servo/issues/30043

* Move to mozjs Traceable and introduce CustomTraceable
2023-08-10 21:46:06 +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
Mukilan Thiyagarajan
5738a16dcb Upgrade the Rust toolchain to 'nightly-2023-02-01'
Signed-off-by: Mukilan Thiyagarajan <mukilanthiagarajan@gmail.com>
2023-02-01 19:38:06 +05:30
Josh Matthews
801dfeff17 Update to latest nightly. 2022-11-21 00:59:32 -05:00
yvt
687ac6c77f fix(script_plugins): adapt to the new rustc lint API
<https://github.com/rust-lang/rust/pull/101986>
2022-10-16 19:19:13 +09:00
yvt
00f6b6f36e fix(script_plugins): Map::get_parent_item now returns OwnerId instead of LocalDefId
<https://github.com/rust-lang/rust/pull/102040>
2022-10-16 19:19:13 +09:00
yvt
66c03e3c96 fix(script_plugins): LintStore::register_late_pass now passes an extra arg to a given closure
<https://github.com/rust-lang/rust/pull/101501>
2022-10-16 19:19:13 +09:00
yvt
fbc1ae8533 fix(script_plugins): hir::BindingAnnotation::{Unannotated, Mutable} have been replaced by associated constants
<https://github.com/rust-lang/rust/pull/101241>
2022-10-16 19:19:13 +09:00
yvt
3fd4fd0388 fix(script_plguins): rustc_ast::ast::AttrKind::Normal fields are now boxed
<https://github.com/rust-lang/rust/pull/100441>
2022-10-16 19:19:12 +09:00
yvt
065c59665c fix(script_plugins): replace TyCtxt::{get_attrs -> get_attrs_unchecked}
[rust-lang/rust#95562][1] renames the existing method `get_attrs` to
`get_attrs_unchecked` and introduces a new method in its former place.
The new method takes an attribute name and returns attributes of that
name. It also checks that, if the attribute name is marked as local-
only, the given `DefId` is local as well to prevent misuses. The old
method, now named `get_attrs_unchecked`, returns all attributes of a
given `DefId`; thus it's "unchecked" in the sense that it's up to the
callers to be certain whether the attributes they are looking for are
local-only.

The new `get_attrs` method lacks the support for attribute names with
more than one path component, which is why we can't just migrate to the
new `get_attrs` method here. Although `get_attrs_unchecked` is marked
for future removal in the compile source code, there's a discussion
about [supporting][2] this use case.

[1]: https://github.com/rust-lang/rust/pull/95562
[2]: https://github.com/rust-lang/rust/pull/95562/files#r915537557
2022-10-16 19:19:12 +09:00
yvt
b4c1c972d4 fix(script_plugins): the visibility fields of rustc_hir::intravisit::FnKind are gone
<https://github.com/rust-lang/rust/pull/93970>
2022-10-16 17:02:14 +09:00
Teymour Aldridge
3e5cd8815d Fix some Clippy lints. 2022-08-04 00:13:36 +08:00
Josh Matthews
0179edb707 Update nightly Rust. 2022-03-26 21:37:37 -04:00
Josh Matthews
af5a17f94b Update rustc to 3/6 nightly. 2022-03-06 18:11:57 -05:00
Josh Matthews
18dbcda8f5 Update rustc. 2022-01-20 23:05:47 -05:00
Josh Matthews
898f66bcd0 Update rustc. 2021-12-02 17:05:19 -05:00
Josh Matthews
01681e79c4 Update nightly rustc. 2021-11-01 08:46:18 -04:00
bjorn3
7bc6742a45
Remove unnecessary feature gate 2021-08-13 13:03:46 +02:00
bjorn3
5b0d7fbe5d
Fix lint 2021-08-10 15:34:50 +02:00
bjorn3
92a23f7583
Update script_plugin for rust-lang/rust#85296 2021-08-09 12:01:42 +02:00
Josh Matthews
8d5dd66ed3 Update to 7/17 nightly. 2021-07-17 16:41:38 -04:00
Dominic Cooney
0955b686ed
Don't name unused ExpnKind::Macro fields in components/script_plugins
Co-authored-by: Simon Sapin <simon.sapin@exyr.org>
2021-05-22 23:47:27 +09:00
Dominic Cooney
7d997748da Update toolchain to nightly-2021-05-18
The nightly-2021-03-12 toolchain doesn't have RLS on Windows. This
breaks code completion in Visual Studio Code because the rust plugin
picks up the project toolchain.

RLS is available in all tier one platforms in nightly-2021-05-18 per:
https://rust-lang.github.io/rustup-components-history/

Signed-off-by: Dominic Cooney <dominic.cooney@gmail.com>
2021-05-22 19:47:31 +09:00
bjorn3
40a6aad6b9
Update doc comment for script_plugins/lib.rs
script_plugins no longer provides any macros. It currently only provides the must_root lint.
2021-05-14 14:44:12 +02:00
Josh Matthews
129c583799 Update to 3/12 rustc nightly. 2021-03-14 13:24:21 -04:00
Simon Sapin
aa854ec2d2 Upgrade to rustc 1.52.0-nightly (a8486b64b 2021-02-24) 2021-02-25 20:31:43 +01:00
Simon Sapin
173123a768 Upgrade to rustc 1.48.0-nightly (623fb90b5 2020-09-26) 2021-01-26 09:23:03 +01:00
Josh Matthews
b7f0612807 Update to 7/27 nightly rustc. 2020-07-27 12:56:57 -04:00
Josh Matthews
6843d51a26 Update to 7/6 rustc. 2020-07-06 10:06:06 -04:00
Josh Matthews
4b86df4378
Update to new internal rustc tables() API. 2020-06-30 16:52:14 -04:00
Simon Sapin
1c0549ce7f Upgrade to rustc 1.44.0-nightly (42abbd887 2020-04-07) 2020-04-09 21:33:44 +02:00
Simon Sapin
651b087155 Upgrade to rustc 1.44.0-nightly (211365947 2020-03-30) 2020-04-08 14:42:45 +02:00
Josh Matthews
a555e7443b Update rustc to 3/16 nightly. 2020-03-16 13:34:50 -04:00
Josh Matthews
51145cfd83 Update to 3/4 nightly rustc. 2020-03-10 10:09:07 -04:00
Josh Matthews
a29f4a9afe Revert "Auto merge of #25898 - jdm:rustup, r=asajeffrey"
This reverts commit ea8aed1ba9, reversing
changes made to 3749eb5397.
2020-03-06 00:06:15 -05:00
Josh Matthews
bf7537ef5b Update to 3/4 nightly rustc. 2020-03-04 15:08:18 -05:00
Simon Sapin
708d3737df Upgrade to rustc 1.43.0-nightly (5d04ce67f 2020-02-13) 2020-02-14 12:27:14 +01:00
Simon Sapin
db4f27f361 Use the matches! macro from the standard library 2020-02-12 10:08:31 +01:00
Simon Sapin
850f52c327 Upgrade to rustc 1.42.0-nightly (3291ae339 2020-01-15) 2020-01-16 08:46:41 +01:00
Kunal Mohan
02c1612cb0
Add accountable-refcell as optional build time feature 2020-01-08 09:44:41 +05:30
Simon Sapin
1ff5433aef Upgrade to rustc 1.42.0-nightly (9b98af84c 2019-12-22) 2019-12-23 14:07:01 +01:00
Simon Sapin
4cbbb625d0 Upgrade to rustc 1.41.0-nightly (7afe6d9d1 2019-12-03) 2019-12-04 12:29:17 +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
091feba0ba Use #![register_attr(…)] instead of Registry::register_attribute
CC https://github.com/rust-lang/rust/pull/66344, https://github.com/rust-lang/rust/issues/66080
2019-11-15 16:46:50 +01:00
Simon Sapin
d3439fb4d1 Upgrade to rustc 1.40.0-nightly (246be7e1a 2019-10-25) 2019-10-26 13:03:49 +02:00
Simon Sapin
81b7f046bf Move script_plugins to a single file 2019-09-29 23:20:48 +02: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
Simon Sapin
5b935a60a5 Upgrade to rustc 1.40.0-nightly (084beb83e 2019-09-27) 2019-09-28 12:33:33 +02:00