# error[E0119]: conflicting implementations of trait `Trait` for type `Type`

- **ID:** `rust/e0119-conflicting-implementations-of-trait`
- **Domain:** rust
- **Category:** type_error
- **Error Code:** `E0119`
- **Verification:** ai_generated
- **Fix Rate:** 85%

## Root Cause

Two or more impl blocks provide implementations of the same trait for the same type, or an impl conflicts with a blanket impl.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| rustc 1.75.0 | active | — | — |
| rustc 1.78.0 | active | — | — |
| rustc 1.80.0 | active | — | — |

## Workarounds

1. **Remove the duplicate impl block. Example: keep only one `impl Trait for MyType`.** (95% success)
   ```
   Remove the duplicate impl block. Example: keep only one `impl Trait for MyType`.
   ```
2. **Use a newtype pattern to create a distinct type. Example: `struct MyWrapper(MyType);` and implement the trait for MyWrapper.** (85% success)
   ```
   Use a newtype pattern to create a distinct type. Example: `struct MyWrapper(MyType);` and implement the trait for MyWrapper.
   ```
3. **If the conflict is with a blanket impl, add a type constraint or use specialization (if nightly) with `default impl`. Example: `impl<T: std::fmt::Debug> Trait for T { }`.** (70% success)
   ```
   If the conflict is with a blanket impl, add a type constraint or use specialization (if nightly) with `default impl`. Example: `impl<T: std::fmt::Debug> Trait for T { }`.
   ```

## Dead Ends

- **** — If both impls are needed for different purposes, removing one will cause missing trait implementation errors elsewhere. (50% fail)
- **** — Rust doesn't have a lint to suppress conflicting impls; it's a fundamental type system error. (100% fail)
- **** — If the blanket impl covers the wrapper (e.g., impl<T> Trait for T), the conflict persists. (60% fail)
