# error[E0277]: `Cell<i32>` cannot be shared between threads safely

- **ID:** `rust/e0277-send-not-implemented-for-arc-cell`
- **Domain:** rust
- **Category:** type_error
- **Error Code:** `E0277`
- **Verification:** ai_generated
- **Fix Rate:** 85%

## Root Cause

Attempting to send a type containing Cell (which is !Send) across threads, typically via Arc<Cell<T>> or a struct with Cell field.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| rustc 1.68 | active | — | — |
| rustc 1.75 | active | — | — |
| rustc 1.82 | active | — | — |
| rustc 1.90 | active | — | — |

## Workarounds

1. **Replace Cell with Mutex: `let shared = Arc::new(Mutex::new(42));` then use `shared.lock().unwrap()` to access the value. This makes the type Send because Mutex<T> is Send if T: Send.** (95% success)
   ```
   Replace Cell with Mutex: `let shared = Arc::new(Mutex::new(42));` then use `shared.lock().unwrap()` to access the value. This makes the type Send because Mutex<T> is Send if T: Send.
   ```
2. **Use `std::cell::RefCell` with `Mutex` outer: `Arc<Mutex<RefCell<T>>>` if interior mutability is needed but the outer type must be Send.** (80% success)
   ```
   Use `std::cell::RefCell` with `Mutex` outer: `Arc<Mutex<RefCell<T>>>` if interior mutability is needed but the outer type must be Send.
   ```
3. **If the value is only read, use `Arc<std::sync::RwLock<T>>` for better concurrency.** (85% success)
   ```
   If the value is only read, use `Arc<std::sync::RwLock<T>>` for better concurrency.
   ```

## Dead Ends

- **** — Arc<T> only implements Send if T: Send, and Cell is !Send, so Arc<Cell<i32>> remains !Send. (95% fail)
- **** — Unsafe impl of Send for a type containing Cell is unsound; the compiler will still reject it unless you also disable the lint, and it may cause data races at runtime. (85% fail)
- **** — The compiler correctly rejects because the closure captures a !Send type, even with move. (90% fail)
