Skip to content

#[test] function name with r#keyword be auto filtered out by test framework. #99361

Closed
rust-lang/rust-analyzer
#12993
@Wyvern

Description

@Wyvern

If put Rust keyword in a #[test] function name like r#for r#while r#break etc, e.g.

  #[test]
  fn r#mod(){
        //...
    }

then run test, the test case will be auto filtered out without warning/error.
output:

running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 1 filtered out; finished in 0.00s

is it by design, or an unintentional bug?

env: VScode+RA on nightly channel Rust

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions