# error[E0133]: call to unsafe function is unsafe and requires unsafe block

- **ID:** `rust/e0133-unused-unsafe`
- **Domain:** rust
- **Category:** type_error
- **Error Code:** `E0133`
- **Verification:** ai_generated
- **Fix Rate:** 90%

## Root Cause

Calling a function marked as 'unsafe' without wrapping it in an 'unsafe {}' block.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.65.0 | active | — | — |
| 1.72.0 | active | — | — |
| 1.80.0 | active | — | — |

## Workarounds

1. **Wrap the unsafe call in an 'unsafe { ... }' block. Example: 'unsafe { std::ptr::read(ptr); }'** (95% success)
   ```
   Wrap the unsafe call in an 'unsafe { ... }' block. Example: 'unsafe { std::ptr::read(ptr); }'
   ```
2. **If the function has a safe wrapper, use that instead. E.g., use 'std::slice::from_raw_parts' via safe abstractions.** (85% success)
   ```
   If the function has a safe wrapper, use that instead. E.g., use 'std::slice::from_raw_parts' via safe abstractions.
   ```

## Dead Ends

- **** — Adding 'unsafe' to the function signature instead of wrapping the call in a block — this changes the function's contract but doesn't fix the call site. (70% fail)
- **** — Using '#[allow(unsafe_code)]' lint suppression — this only silences the warning, not the error, and doesn't make the code compile. (90% fail)
