# error[E0599]: no method named `iter` found for struct `std::collections::HashMap<String, i32>` in the current scope

- **ID:** `rust/e0599-no-method-named-iter-found`
- **Domain:** rust
- **Category:** type_error
- **Error Code:** `E0599`
- **Verification:** ai_generated
- **Fix Rate:** 93%

## Root Cause

HashMap does not have an `iter` method that returns an iterator over items; use `iter()` on references or `into_iter()` for owned iteration.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| rustc 1.58.0 | active | — | — |
| rustc 1.64.0 | active | — | — |
| rustc 1.71.0 | active | — | — |

## Workarounds

1. **Use `map.iter()` on a reference: `for (key, value) in &map { ... }` or `let iter = map.iter();`** (95% success)
   ```
   Use `map.iter()` on a reference: `for (key, value) in &map { ... }` or `let iter = map.iter();`
   ```
2. **Use `into_iter()` for owned iteration: `for (key, value) in map { ... }`** (90% success)
   ```
   Use `into_iter()` for owned iteration: `for (key, value) in map { ... }`
   ```
3. **Use `values()` or `keys()` methods: `for value in map.values() { ... }`** (85% success)
   ```
   Use `values()` or `keys()` methods: `for value in map.values() { ... }`
   ```

## Dead Ends

- **** — Iterator is automatically in scope. The issue is that HashMap doesn't have a method named `iter` without the trait bounds being satisfied. (90% fail)
- **** — The method exists but is named `into_iter()` for owned HashMap. `iter()` exists on references like `&map`. (70% fail)
- **** — Iterator is a trait, not a derive macro. You cannot derive Iterator for HashMap. (95% fail)
