Skip to content

Struct-field deletion mutants ignore --re and --exclude-re #632

Description

@P4suta

Struct-field deletion mutants currently bypass the normal mutant-name filters.
Both CLI filters and their config equivalents are affected.

For example:

#[derive(Default)]
struct Settings {
    enabled: bool,
    count: usize,
}

fn settings() -> Settings {
    Settings {
        enabled: true,
        count: 1 + 2,
        ..Default::default()
    }
}

Running:

cargo mutants --Zmutate-file repro.rs --re "delete field enabled"

lists deletion mutants for both enabled and count. Conversely,
--exclude-re "delete field enabled" still lists the enabled mutant.

Struct-field deletion mutants should obey --re and --exclude-re like
the other mutant genres.

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions