# error[E0599]: no method named `parse` found for struct `String` in the current scope

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

## Root Cause

Calling `.parse()` on a String without importing the `FromStr` trait or providing a type annotation for the result.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.65 | active | — | — |
| 1.70 | active | — | — |
| 1.75 | active | — | — |

## Workarounds

1. **Add a type annotation to the result: `let num: u32 = my_string.parse().unwrap();`** (95% success)
   ```
   Add a type annotation to the result: `let num: u32 = my_string.parse().unwrap();`
   ```
2. **Use turbofish syntax: `my_string.parse::<u32>().unwrap();`** (95% success)
   ```
   Use turbofish syntax: `my_string.parse::<u32>().unwrap();`
   ```
3. **Explicitly call `FromStr::from_str`: `u32::from_str(&my_string).unwrap();`** (90% success)
   ```
   Explicitly call `FromStr::from_str`: `u32::from_str(&my_string).unwrap();`
   ```

## Dead Ends

- **Adding `use std::str::FromStr;` but not specifying the target type** — The parse method requires type inference; without a type hint, the compiler cannot determine the output type. (80% fail)
- **Using `as` cast: `my_string as u32`** — String cannot be cast to numeric types with `as`; only primitive numeric types can be cast. (95% fail)
