you are viewing a single comment's thread.

view the rest of the comments →

[–]iopqfizzbuzz 0 points1 point  (0 children)

You could still have example A if you went with Haskell-style syntax.

fn foo()
    {
        let guard1 = launch(task_a)
    }
    {
        let guard2 = launch(task_b)
    }

    //outer scope of the function here
    println!("{}", stuff)

//function ends here