Skip to content

Make unnameable tests an error #52917

Description

@djrenren

Right now the compiler will simply allow tests that cannot be run. The following will compile but will not run any tests.

fn foo() {
  #[test]
  fn bar(){}
}

This constitutes a silent failure and should probably be a hard error (or at least a warning). There's a lint for it: UnnameableTestFunctions but it isn't run by default.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions