Skip to content

Using the #[start] attribute causes --test to be silently ignored #11766

Closed
@nmsmith

Description

@nmsmith

Example:

#[test]
fn test() {
    assert!(false);
}

#[start]
fn start(argc: int, argv: **u8) -> int {
    return 1;
}

Running rustc with the --test flag here causes compilation to occur as if it wasn't used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-attributesArea: Attributes (`#[…]`, `#![…]`)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions