diff --git a/components/script/dom/globalscope.rs b/components/script/dom/globalscope.rs index c60aa0f09be..b44f5c9f954 100644 --- a/components/script/dom/globalscope.rs +++ b/components/script/dom/globalscope.rs @@ -294,6 +294,9 @@ pub struct GlobalScope { /// /// #[ignore_malloc_size_of = "mozjs"] + // `Heap` values must stay boxed, as they need semantics like `Pin` + // (that is, they cannot be moved). + #[allow(clippy::vec_box)] uncaught_rejections: DomRefCell>>>, /// Promises in this list have previously been reported as rejected @@ -302,6 +305,9 @@ pub struct GlobalScope { /// /// #[ignore_malloc_size_of = "mozjs"] + // `Heap` values must stay boxed, as they need semantics like `Pin` + // (that is, they cannot be moved). + #[allow(clippy::vec_box)] consumed_rejections: DomRefCell>>>, /// True if headless mode. @@ -2194,6 +2200,9 @@ impl GlobalScope { } } + // `Heap` values must stay boxed, as they need semantics like `Pin` + // (that is, they cannot be moved). + #[allow(clippy::vec_box)] pub fn get_uncaught_rejections(&self) -> &DomRefCell>>> { &self.uncaught_rejections } @@ -2215,6 +2224,9 @@ impl GlobalScope { } } + // `Heap` values must stay boxed, as they need semantics like `Pin` + // (that is, they cannot be moved). + #[allow(clippy::vec_box)] pub fn get_consumed_rejections(&self) -> &DomRefCell>>> { &self.consumed_rejections }