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
This commit is contained in:
parent
22a9f250b5
commit
eee209d9e2
5 changed files with 99 additions and 44 deletions
|
|
@ -472,7 +472,7 @@ pub fn list_metadata(sess: &Session, path: &Path,
|
|||
/// The diagnostic emitter yielded to the procedure should be used for reporting
|
||||
/// errors of the compiler.
|
||||
pub fn monitor<F:FnOnce()+Send>(f: F) {
|
||||
static STACK_SIZE: uint = 32000000; // 32MB
|
||||
static STACK_SIZE: uint = 8 * 1024 * 1024; // 8MB
|
||||
|
||||
let (tx, rx) = channel();
|
||||
let w = io::ChanWriter::new(tx);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue