Skip to content

fn main detection is too brittle #150

@somethingelseentirely

Description

@somethingelseentirely

The current way of detecting a main method, might break when the source contains a string with a fn main() {.
At the same time it fails to detect main functions that are generated via macros.

I think it would make sense to have a flag that allows the user to force or prevent wrapping, as truly reliably detecting a main seems impossible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions