]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #24021 - pnkfelix:fn-params-outlive-body, r=nikomatsakis
authorbors <bors@rust-lang.org>
Wed, 8 Apr 2015 12:57:58 +0000 (12:57 +0000)
committerbors <bors@rust-lang.org>
Wed, 8 Apr 2015 12:57:58 +0000 (12:57 +0000)
Encode more precise scoping rules for function params

Function params outlive everything in the body (incl temporaries).  Thus if we assign them their own `CodeExtent`, the region inference can properly show that it is sound to have temporaries with destructors that reference the parameters (because such temporaries will be dropped before the parameters are dropped).

Fix #23338

1  2 
src/librustc/metadata/tydecode.rs

Simple merge