Skip to content

-Zinstrument-coverage and matches!() #84892

Open
@scole66

Description

@scole66

When using -Zinstrument-coverage on a recent (first-week-of-May-2021) nightly, the matches! macro is no longer marked covered. (This is likely related to macro coverage rules recently adjusted.) The macro was marked covered earlier in April.

  | res::scanner::tests::template_test_09:
  | 2957|      1|    fn template_test_09() {
  | 2958|      1|        let r = scan_token(&Scanner::new(), "`\\", ScanGoal::InputElementRegExp);
  | 2959|      1|        let (token, scanner) = r;
  | 2960|      1|        assert_eq!(scanner, Scanner { line: 1, column: 1, start_idx: 0 });
  | 2961|      1|        assert!(matches!(token, Token::Error(_)));
  |                              ^0
  | 2962|      1|    }

Meta

rustc --version --verbose:

rustc 1.54.0-nightly (716394d65 2021-05-03)
binary: rustc
commit-hash: 716394d6581b60c75cfdd88b8e5b876f2db88b62
commit-date: 2021-05-03
host: x86_64-unknown-linux-gnu
release: 1.54.0-nightly
LLVM version: 12.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-code-coverageArea: Source-based code coverage (-Cinstrument-coverage)C-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions