Skip to content

The start function should always be recognized as reachable, even with --crate-type=dylib #14034

Closed
@zwarich

Description

@zwarich

Running rustc --crate-type=dylib test.rs on

#[start]
fn start(_argc: int, _argv: **u8) -> int { 0 }

gives the warning

test.rs:2:1: 2:47 warning: code is never used: `start`, #[warn(dead_code)] on by default
test.rs:2 fn start(_argc: int, _argv: **u8) -> int { 0 }
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

despite the start function being generated and exported. Servo hits this warning in src/components/main/servo.rs.

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