Skip to main content

retarget_modules

Function retarget_modules 

Source
pub fn retarget_modules(
    modules: &mut [Module],
    used_items: &UsedItems,
    resolver: &impl Resolver,
)
Expand description

Retarget used identifiers to point at the corresponding declaration.

We call this after usage analysis, because it is mutating the modules, and we want to keep mutations and lookups separate if possible, to avoid multiple mut borrows.

ยงPanics

  • if an identifier has no corresponding declaration.