Function rustc::middle::typeck::check::regionmanip::relate_free_regions[src]

pub fn relate_free_regions(tcx: &ctxt, fn_sig: &FnSig)

This function populates the region map's free_region_map. It walks over the transformed self type and argument types for each function just before we check the body of that function, looking for types where you have a borrowed pointer to other borrowed data (e.g., &'a &'b [uint]. We do not allow references to outlive the things they point at, so we can assume that 'a <= 'b.

Tests: src/test/compile-fail/regions-free-region-ordering-*.rs