]> git.lizzy.rs Git - rust.git/commit
Only count nested returns when the outer return is reachable
authorJames Miller <james@aatch.net>
Mon, 15 Dec 2014 23:21:08 +0000 (12:21 +1300)
committerJames Miller <james@aatch.net>
Thu, 18 Dec 2014 02:28:33 +0000 (15:28 +1300)
commiteee209d9e2dde700a3958f3e539eff02b63f50bd
tree822db6930a4286a44cc638cd11c7919908752538
parent22a9f250b5e2de64c13c0f056aec13eb086ef79d
Only count nested returns when the outer return is reachable

This narrows the definition of nested returns such that only when the
outer return has a chance of being executed (due to the inner return
being conditional) do we mark the function as having nested returns.

Fixes #19684
src/librustc/middle/cfg/mod.rs
src/librustc/middle/graph.rs
src/librustc_driver/lib.rs
src/librustc_trans/trans/base.rs
src/librustc_trans/trans/common.rs