File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -144,7 +144,10 @@ pub struct RootedBase {
144144// Annoyingly, bindgen can't cope with SM's use of templates, so we have to roll our own.
145145#[ repr( C ) ]
146146#[ derive( Debug ) ]
147- #[ cfg_attr( feature = "crown" , allow( crown:: unrooted_must_root_lint:: allow_unrooted_interior) ) ]
147+ #[ cfg_attr(
148+ feature = "crown" ,
149+ allow( crown:: unrooted_must_root_lint:: allow_unrooted_interior)
150+ ) ]
148151pub struct Rooted < T : RootKind > {
149152 pub vtable : T :: Vtable ,
150153 pub base : RootedBase ,
Original file line number Diff line number Diff line change @@ -51,7 +51,10 @@ unsafe impl<T: CustomTrace> CustomTrace for Vec<T> {
5151// This structure reimplements a C++ class that uses virtual dispatch, so
5252// use C layout to guarantee that vftable in CustomAutoRooter is in right place.
5353#[ repr( C ) ]
54- #[ cfg_attr( feature = "crown" , allow( crown:: unrooted_must_root_lint:: allow_unrooted_interior) ) ]
54+ #[ cfg_attr(
55+ feature = "crown" ,
56+ allow( crown:: unrooted_must_root_lint:: allow_unrooted_interior)
57+ ) ]
5558pub struct CustomAutoRooter < T > {
5659 _base : jsapi:: CustomAutoRooter ,
5760 data : T ,
@@ -115,7 +118,10 @@ impl<T: CustomTrace> CustomAutoRooter<T> {
115118/// DerefMut implementations.
116119/// This structure is created by `root` method on `CustomAutoRooter` or
117120/// by the `auto_root!` macro.
118- #[ cfg_attr( feature = "crown" , allow( crown:: unrooted_must_root_lint:: allow_unrooted_interior) ) ]
121+ #[ cfg_attr(
122+ feature = "crown" ,
123+ allow( crown:: unrooted_must_root_lint:: allow_unrooted_interior)
124+ ) ]
119125pub struct CustomAutoRooterGuard < ' a , T : ' a + CustomTrace > {
120126 rooter : & ' a mut CustomAutoRooter < T > ,
121127}
Original file line number Diff line number Diff line change @@ -15,7 +15,10 @@ use mozjs_sys::jsgc::ValueArray;
1515/// Rust API for keeping a Rooted value in the context's root stack.
1616/// Example usage: `rooted!(in(cx) let x = UndefinedValue());`.
1717/// `RootedGuard::new` also works, but the macro is preferred.
18- #[ cfg_attr( feature = "crown" , allow( crown:: unrooted_must_root_lint:: allow_unrooted_interior) ) ]
18+ #[ cfg_attr(
19+ feature = "crown" ,
20+ allow( crown:: unrooted_must_root_lint:: allow_unrooted_interior)
21+ ) ]
1922pub struct RootedGuard < ' a , T : ' a + RootKind + Initialize > {
2023 root : & ' a mut Rooted < T > ,
2124}
You can’t perform that action at this time.
0 commit comments