Skip to main content

Module reconstruct_copy_for_deref

Module reconstruct_copy_for_deref 

Source
Expand description

Reconstruct places that rustc split with CopyForDeref in elaborated MIR.

A statement like *tuple.1 = x can become _tmp = noretag copy tuple.1; *_tmp = x. The copy only reads the pointer; we put the dereference back on tuple.1. This also applies to shared references and boxes, and to reads of pointer metadata.

Structsยง

CopyInfo ๐Ÿ”’
Transform
UseCollector ๐Ÿ”’