> Aztec.nr API reference, v6.0.0 (mainnet and testnet). Index: https://docs.aztec.network/aztec-nr-api/v6.0.0/llms.txt

# Function as_witness

Module: `std`

```rust
pub fn as_witness(x: Field)
```

Force a field value to be a witness instead of a constant in the compiled output. This is often only useful for debugging compiler optimizations.

This has no effect in unconstrained or comptime code.
