Skip to content
Opensource internals
  • Posts

Mir

Four Ways to Drop: How rustc Decides Whether a Value Needs a Drop Flag

Oct 21, 2026 5 min read Jay Hubbert

Drop elaboration in rustc classifies each drop as Dead, Static, Conditional or Open using two dataflow analyses; only the Conditional case needs a runtime drop flag, so most drops …

RustInternalsCompilerMirDropsPerformance

Read more →

The Call Graph From the Wrong MIR: How rustc's Inliner Avoids a Query Cycle

Oct 21, 2026 6 min read Jay Hubbert

rustc’s MIR inliner computes the call graph from mir_promoted rather than optimized_mir, so the query graph stays acyclic; the result is conservative but never deadlocks.

RustInternalsCompilerMirInliningIncrementalPerformance

Read more →

Why rustc's GVN Refuses to Merge Two Borrows: Provenance as a Type

Oct 21, 2026 7 min read Jay Hubbert

GVN in rustc gives every borrow a unique provenance marker whose hash and equality implementations panic, so the compiler cannot accidentally merge two pointers.

RustInternalsCompilerMirOptimizationPerformance

Read more →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·