> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sifr.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# SIFR-OWN-0005: Immutable parameter is mutated.

> Immutable parameter is mutated.

`SIFR-OWN-0005` belongs to the **Ownership and borrowing** diagnostic family. It means: immutable parameter is mutated.

## Why It Happens

The ownership model would be violated. Move values only once, keep borrows scoped, and cross task/channel/IPC boundaries only with owned values that satisfy the required safety traits.

<Info>
  Use `sifr --explain SIFR-OWN-0005` locally to see the renderer's exact message template and any machine-applicable suggestions for the compiler version you are running.
</Info>

## Erroneous Code

```python theme={null}
def consume(own values: list[int]) -> int:
    return len(values)

items: list[int] = [1, 2]
taken: int = consume(items)
count: int = len(items)
```

## How To Fix It

Move ownership only after the last use, keep mutable borrows scoped, and send only owned sendable values across task or channel boundaries.

## Fixed Code

```python theme={null}
def consume(own values: list[int]) -> int:
    return len(values)

items: list[int] = [1, 2]
count: int = len(items)
taken: int = consume(items)
```

## Details

| Field                  | Value                                                                 |
| ---------------------- | --------------------------------------------------------------------- |
| Code                   | `SIFR-OWN-0005`                                                       |
| Family                 | `OWN`                                                                 |
| Severity               | Error                                                                 |
| Stability              | stable                                                                |
| Owner                  | `sifr_lowering::lower`                                                |
| Representative fixture | `crates/sifr/tests/e2e/fail/own_parameter_mutation_requires_mut.sifr` |

See the [Error Codes index](/diagnostics/error-codes) for the complete catalog.
