Skip to content

const fn: reported test for a simple match with a wildcard-only arm #66758

Closed
@Centril

Description

@Centril

This works; let's consider adding a test for it since it's a bit of a special case. Reported to be working in #49146 (comment) by @jyn514.

// check-pass

#![feature(const_if_match)]

enum E {
    A,
    B,
    C
}

const fn f(e: E) {
    match e {
        _ => {}
    }
}

Metadata

Metadata

Labels

A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.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