Skip to content

Build is broken with crown analysis enabled #737

Description

@jdm

This was not caught by Servo's CI because we always run against downloaded binaries, so the crown build for mozjs never actually occurs in CI.

error: Type must be rooted.
   --> /Users/jdm/src/mozjs/mozjs-sys/src/jsgc.rs:344:27
    |
344 |     pub fn boxed(v: T) -> Box<Heap<T>>
    |                           ^^^^^^^^^^^^
    |
    = note: `#[deny(crown::unrooted_must_root)]` on by default

error: Expression of type std::boxed::Box<jsgc::Heap<T/#0>, std::alloc::Global> must be rooted.
   --> /Users/jdm/src/mozjs/mozjs-sys/src/jsgc.rs:348:13
    |
348 |         let boxed = Box::new(Heap::default());
    |             ^^^^^

error: Type must be rooted, use #[crown::unrooted_must_root_lint::must_root] on the struct definition to propagate.
     --> /Users/jdm/src/servo/target/debug/build/mozjs_sys-a12c30867b0fe764/out/build/jsapi.rs:14866:13
      |
14866 |             pub expando: root::JS::Heap<root::JS::Value>,
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions