File tree Expand file tree Collapse file tree 3 files changed +16
-4
lines changed Expand file tree Collapse file tree 3 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -144,7 +144,10 @@ pub struct RootedBase {
144
144
// Annoyingly, bindgen can't cope with SM's use of templates, so we have to roll our own.
145
145
#[ repr( C ) ]
146
146
#[ 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
+ ) ]
148
151
pub struct Rooted < T : RootKind > {
149
152
pub vtable : T :: Vtable ,
150
153
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> {
51
51
// This structure reimplements a C++ class that uses virtual dispatch, so
52
52
// use C layout to guarantee that vftable in CustomAutoRooter is in right place.
53
53
#[ 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
+ ) ]
55
58
pub struct CustomAutoRooter < T > {
56
59
_base : jsapi:: CustomAutoRooter ,
57
60
data : T ,
@@ -115,7 +118,10 @@ impl<T: CustomTrace> CustomAutoRooter<T> {
115
118
/// DerefMut implementations.
116
119
/// This structure is created by `root` method on `CustomAutoRooter` or
117
120
/// 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
+ ) ]
119
125
pub struct CustomAutoRooterGuard < ' a , T : ' a + CustomTrace > {
120
126
rooter : & ' a mut CustomAutoRooter < T > ,
121
127
}
Original file line number Diff line number Diff line change @@ -15,7 +15,10 @@ use mozjs_sys::jsgc::ValueArray;
15
15
/// Rust API for keeping a Rooted value in the context's root stack.
16
16
/// Example usage: `rooted!(in(cx) let x = UndefinedValue());`.
17
17
/// `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
+ ) ]
19
22
pub struct RootedGuard < ' a , T : ' a + RootKind + Initialize > {
20
23
root : & ' a mut Rooted < T > ,
21
24
}
You can’t perform that action at this time.
0 commit comments