# no-redundant-label

Disallow labels on transfers to the target selected without a label

A labeled `break` or `continue` is redundant when the unlabeled statement selects the same control target.
Instead, you SHOULD omit the label and reserve labeled transfers for nonlocal control flow.

- Category: style
- Level: warning
- Fix: automatic
- Scope: module

## Reported

```ds title="main.ds"
outer: loop {
    break outer;
}
```

## Accepted

```ds title="main.ds"
outer: loop {
    break;
}
```

## Prior art

- [ESLint · no-extra-label](https://eslint.org/docs/latest/rules/no-extra-label)

[language/linter/src/rules/style/no_redundant_label.rs:8](https://github.com/destack-sh/destack/blob/main/language/linter/src/rules/style/no_redundant_label.rs#L8)
