# Sprint 47 Plan: Rust Semantic Lowering to Core IR ## Context Sprint 47 makes Rust the first full-fidelity source language for the new semantic core. This sprint focuses on lowering correctness: ownership/borrowing, traits, error semantics, async semantics, and macro boundary behavior. --- ## Goals 1. Lower real Rust constructs into `SemanticCoreIR` 2. Build ownership and borrow-region graph extraction 3. Capture trait and generics semantics in IR 4. Emit review packets for unsupported/unsafe regions --- ## Steps ### Step 699: Rust ownership/borrow graph extractor (12 tests) ### Step 700: Lifetime region lowering (10 tests) ### Step 701: Trait + impl lowering (10 tests) ### Step 702: Generic/monomorphization intent model (10 tests) ### Step 703: Error model lowering (`Result`, `Option`, panic) (10 tests) ### Step 704: Async/await state intent lowering (10 tests) ### Step 705: Macro boundary capture + fallback policy (8 tests) ### Step 706: Unsafe block risk packet generator (8 tests) ### Step 707: `whetstone_analyze_rust_semantics` MCP tool (8 tests) ### Step 708: Sprint 47 integration summary + regression (8 tests) For each step above: - Create/extend modules under `editor/src/rust_ir/` - Add deterministic JSON packets for downstream C++ raising - Attach confidence + review-required tags at lowering time --- ## Verification Focus - Rust sample corpus must cover: ownership transfer, borrowing, lifetimes, traits, generics, async, unsafe, macro usage - Unsupported features must fail closed with actionable diagnostics - No silent semantic drop allowed