Skip to content

#[test] fns is not type checked when not testing #1748

Closed
@nikomatsakis

Description

@nikomatsakis

If you are not running --test, then #[test] functions are stripped out of the source. This is good, in one sense, but bad in another---the functions are not type checked! It is very easy for them to bitrot this way. I think they ought to stick around but not be translated; we can ensure that #[test] functions are not referenced from other functions in check_fn_usage, or whatever that pass is called.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-testsuiteArea: The testsuite used to check the correctness of rustcA-type-systemArea: Type systemE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions