Skip to content

error message for start function confusing #9575

@metajack

Description

@metajack

If you had an old start function like:

#[start]
fn start(argc: int, argv: **u8, crate_map: *u8) -> int {
 // ...
}

You this message:
error: start function expects type: extern "Rust" fn(int, **u8) -> int: incorrect number of function parameters

However, if actually change the signature to extern "Rust" fn start(argc: int, argv: **u8) -> int` then you get the this message:

error: start function expects type: extern "Rust" fn(int, **u8) -> int: expected impure fn but found extern fn

It took me a bit to figure out that I am not supposed to add extern "Rust" myself.

cc @brson

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions